(173.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (122.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (144.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.7ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (148.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (141.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (123.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140717183129')  (123.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140717181406')  (140.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140717180443')  (132.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140717181134') ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (167.4ms) DROP TABLE "billing_accounts"  (148.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (147.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.4ms) DROP TABLE "billing_charges"  (151.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.7ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (129.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (149.0ms) DROP TABLE "billing_discounts"  (123.3ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.9ms) DROP TABLE "billing_payments"  (139.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.2ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.7ms) DROP TABLE "billing_accounts"  (148.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (148.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (152.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (121.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.1ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.3ms) DROP TABLE "billing_payments"  (123.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (149.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.2ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (183.9ms) DROP TABLE "billing_accounts"  (147.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (139.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.3ms) DROP TABLE "billing_charges"  (143.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.9ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (167.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (368.1ms) DROP TABLE "billing_payments"  (131.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.2ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (177.2ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.2ms) DROP TABLE "billing_charges"  (137.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (139.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.1ms) DROP TABLE "billing_discounts"  (148.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.5ms) DROP TABLE "billing_payments"  (148.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateBillingOrigins (20140717202527)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140717202527"]]  (218.2ms) commit transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_discounts_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_discounts_on_account_id' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.5ms) DROP TABLE "billing_accounts"  (131.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (140.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.9ms) DROP TABLE "billing_charges"  (151.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (145.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_discounts"  (164.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.9ms) DROP TABLE "billing_payments"  (123.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (123.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-17 22:20:56', '2014-07-17 22:20:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-17 22:20:56', '2014-07-17 22:20:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-17 22:20:56', '2014-07-17 22:20:56', 298486374)  (146.8ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 0ms  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (183.3ms) DROP TABLE "billing_accounts"  (131.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.8ms) DROP TABLE "billing_charges"  (128.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (122.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (148.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.7ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_payments"  (131.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:22:24', '2014-07-18 10:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:22:24', '2014-07-18 10:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:22:24', '2014-07-18 10:22:24', 298486374)  (136.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 0ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (160.9ms) DROP TABLE "billing_accounts"  (166.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (122.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.5ms) DROP TABLE "billing_charges"  (127.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (123.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (132.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.3ms) DROP TABLE "billing_discounts"  (148.2ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.5ms) DROP TABLE "billing_origins"  (131.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (131.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (122.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:27:03', '2014-07-18 10:27:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:27:03', '2014-07-18 10:27:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:27:03', '2014-07-18 10:27:03', 298486374)  (131.3ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 0ms  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (153.3ms) DROP TABLE "billing_accounts"  (131.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (122.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.5ms) DROP TABLE "billing_charges"  (128.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (123.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (123.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.5ms) DROP TABLE "billing_discounts"  (132.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.6ms) DROP TABLE "billing_origins"  (141.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (131.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:30:34', '2014-07-18 10:30:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:30:34', '2014-07-18 10:30:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:30:34', '2014-07-18 10:30:34', 298486374)  (144.4ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.7ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.5ms) DROP TABLE "billing_charges"  (152.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.1ms) DROP TABLE "billing_discounts"  (123.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.2ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_payments"  (141.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (146.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140718104656')  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:49:59', '2014-07-18 10:49:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:49:59', '2014-07-18 10:49:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:49:59', '2014-07-18 10:49:59', 298486374)  (147.3ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (177.9ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.7ms) DROP TABLE "billing_charges"  (145.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.3ms) DROP TABLE "billing_discounts"  (148.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.9ms) DROP TABLE "billing_payments"  (139.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.8ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:51:40', '2014-07-18 10:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 10:51:40', '2014-07-18 10:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 10:51:40', '2014-07-18 10:51:40', 298486374)  (138.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (156.4ms) DROP TABLE "billing_accounts"  (148.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (674.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (140.3ms) DROP TABLE "billing_charges"  (137.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.4ms) DROP TABLE "billing_discounts"  (156.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (156.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (139.3ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_payments"  (131.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:45:17', '2014-07-18 12:45:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:45:17', '2014-07-18 12:45:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:45:17', '2014-07-18 12:45:17', 298486374)  (138.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (157.5ms) DROP TABLE "billing_accounts"  (147.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (146.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.6ms) DROP TABLE "billing_charges"  (143.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.6ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (149.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (633.3ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "profiles"  (148.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) SQLite3::SQLException: table billing_accounts has no column named billable: INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) SQLite3::SQLException: table billing_accounts has no column named billable: INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) SQLite3::SQLException: table billing_accounts has no column named billable: INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) SQLite3::SQLException: table billing_accounts has no column named billable: INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962)  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:49:02', '2014-07-18 12:49:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962) SQLite3::SQLException: table billing_accounts has no column named billable: INSERT INTO "billing_accounts" ("billable", "created_at", "updated_at", "id") VALUES ('one(Profile)', '2014-07-18 12:49:02', '2014-07-18 12:49:02', 980190962)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (163.0ms) DROP TABLE "billing_accounts"  (148.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.4ms) DROP TABLE "billing_charges"  (159.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (148.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.3ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.5ms) DROP TABLE "billing_payments"  (140.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:50:46', '2014-07-18 12:50:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:50:46', '2014-07-18 12:50:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:50:46', '2014-07-18 12:50:46', 980190962)  (137.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (153.8ms) DROP TABLE "billing_accounts"  (148.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.6ms) DROP TABLE "billing_charges"  (135.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.0ms) DROP TABLE "billing_discounts"  (156.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (148.8ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (156.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.6ms) DROP TABLE "profiles"  (139.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:53:09', '2014-07-18 12:53:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:53:09', '2014-07-18 12:53:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:53:09', '2014-07-18 12:53:09', 980190962)  (132.7ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (163.9ms) DROP TABLE "billing_accounts"  (139.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (147.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.0ms) DROP TABLE "billing_charges"  (136.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (130.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.1ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (156.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.9ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.8ms) DROP TABLE "billing_payments"  (149.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:54:13', '2014-07-18 12:54:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:54:13', '2014-07-18 12:54:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:13', '2014-07-18 12:54:13', 980190962)  (132.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new -----------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new ---------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (209.6ms) DROP TABLE "billing_accounts"  (205.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.6ms) DROP TABLE "billing_charges"  (160.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.0ms) DROP TABLE "billing_discounts"  (133.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.0ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.3ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:54:29', '2014-07-18 12:54:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:54:29', '2014-07-18 12:54:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:54:29', '2014-07-18 12:54:29', 980190962)  (159.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (183.6ms) DROP TABLE "billing_accounts"  (131.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (144.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.8ms) DROP TABLE "billing_discounts"  (156.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.7ms) DROP TABLE "billing_payments"  (148.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.9ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:55:07', '2014-07-18 12:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:55:07', '2014-07-18 12:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:07', '2014-07-18 12:55:07', 980190962)  (143.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (230.7ms) DROP TABLE "billing_accounts"  (148.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (164.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (145.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.7ms) DROP TABLE "billing_discounts"  (148.5ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:55:40', '2014-07-18 12:55:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:55:40', '2014-07-18 12:55:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:55:40', '2014-07-18 12:55:40', 980190962)  (140.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (170.6ms) DROP TABLE "billing_accounts"  (148.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.6ms) DROP TABLE "billing_charges"  (160.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_discounts"  (141.5ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.3ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payments"  (156.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:56:23', '2014-07-18 12:56:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:56:23', '2014-07-18 12:56:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:56:23', '2014-07-18 12:56:23', 980190962)  (156.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (177.5ms) DROP TABLE "billing_accounts"  (131.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (147.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.9ms) DROP TABLE "billing_charges"  (143.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.9ms) DROP TABLE "billing_discounts"  (148.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (148.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (148.1ms) DROP TABLE "billing_origins"  (150.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payments"  (139.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:59:25', '2014-07-18 12:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 12:59:25', '2014-07-18 12:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.2ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 12:59:25', '2014-07-18 12:59:25', 980190962)  (142.8ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (163.6ms) DROP TABLE "billing_accounts"  (140.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (164.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.1ms) DROP TABLE "billing_charges"  (143.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_discounts"  (148.3ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.9ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.7ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.1ms) DROP TABLE "billing_payments"  (131.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "profiles"  (133.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:00:12', '2014-07-18 13:00:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:00:12', '2014-07-18 13:00:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:12', '2014-07-18 13:00:12', 980190962)  (137.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (167.7ms) DROP TABLE "billing_accounts"  (148.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (147.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.0ms) DROP TABLE "billing_charges"  (160.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.9ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (140.6ms) DROP TABLE "billing_origins"  (140.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payments"  (148.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:00:27', '2014-07-18 13:00:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:00:27', '2014-07-18 13:00:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:00:27', '2014-07-18 13:00:27', 980190962)  (154.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.0ms) DROP TABLE "billing_accounts"  (148.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (146.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (159.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.0ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (123.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (140.8ms) DROP TABLE "billing_payments"  (148.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (148.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:01:18', '2014-07-18 13:01:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:01:18', '2014-07-18 13:01:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:18', '2014-07-18 13:01:18', 980190962)  (146.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.0ms) DROP TABLE "billing_accounts"  (139.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (147.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (154.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (359.5ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (142.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (123.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.6ms) DROP TABLE "billing_payments"  (131.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.7ms) DROP TABLE "profiles"  (199.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:01:50', '2014-07-18 13:01:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:01:50', '2014-07-18 13:01:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:01:50', '2014-07-18 13:01:50', 980190962)  (157.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (147.1ms) DROP TABLE "billing_accounts"  (148.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (144.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (140.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.1ms) DROP TABLE "billing_origins"  (132.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.8ms) DROP TABLE "billing_payments"  (148.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:03:13', '2014-07-18 13:03:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:03:13', '2014-07-18 13:03:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:13', '2014-07-18 13:03:13', 980190962)  (157.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ApplicationController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/application/index.html.erb within layouts/billing/application (3.6ms) Completed 200 OK in 32ms (Views: 31.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (122.5ms) DROP TABLE "billing_accounts"  (132.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (146.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.6ms) DROP TABLE "billing_charges"  (160.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (229.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (146.8ms) DROP TABLE "billing_discounts"  (157.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (141.2ms) DROP TABLE "billing_origins"  (132.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.6ms) DROP TABLE "billing_payments"  (131.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.7ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:03:53', '2014-07-18 13:03:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:03:53', '2014-07-18 13:03:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:03:53', '2014-07-18 13:03:53', 980190962)  (155.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ApplicationController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/application/index.html.erb within layouts/billing/application (3.4ms) Completed 200 OK in 19ms (Views: 18.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (160.2ms) DROP TABLE "billing_accounts"  (148.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (147.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (124.1ms) DROP TABLE "billing_charges"  (135.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (139.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.8ms) DROP TABLE "billing_discounts"  (156.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (155.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.2ms) DROP TABLE "billing_payments"  (148.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:04:20', '2014-07-18 13:04:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:04:20', '2014-07-18 13:04:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:04:20', '2014-07-18 13:04:20', 980190962)  (141.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ApplicationController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/application/index.html.erb within layouts/billing/application (2.9ms) Completed 200 OK in 18ms (Views: 17.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.9ms) DROP TABLE "billing_accounts"  (148.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (140.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (165.4ms) DROP TABLE "billing_charges"  (143.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.4ms) DROP TABLE "billing_discounts"  (148.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.1ms) DROP TABLE "billing_origins"  (148.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payments"  (156.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (123.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:05:47', '2014-07-18 13:05:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:05:47', '2014-07-18 13:05:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:05:47', '2014-07-18 13:05:47', 980190962)  (148.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ApplicationController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/application/index.html.erb within layouts/billing/application (3.4ms) Completed 200 OK in 20ms (Views: 19.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------ Billing::AccountsControllerTest: test_show ------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.8ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (123.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (123.2ms) DROP TABLE "billing_charges"  (136.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.6ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.5ms) DROP TABLE "billing_origins"  (132.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.4ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (116.0ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:06:51', '2014-07-18 13:06:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:06:51', '2014-07-18 13:06:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:06:51', '2014-07-18 13:06:51', 980190962)  (135.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ApplicationController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 18ms (Views: 17.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (177.5ms) DROP TABLE "billing_accounts"  (131.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (122.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (114.7ms) DROP TABLE "billing_charges"  (202.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (122.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (131.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.6ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.7ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.9ms) DROP TABLE "billing_payments"  (148.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (107.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:07:56', '2014-07-18 13:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:07:56', '2014-07-18 13:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.2ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:07:56', '2014-07-18 13:07:56', 980190962)  (131.3ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (173.1ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.4ms) DROP TABLE "billing_charges"  (135.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.1ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (123.1ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.4ms) DROP TABLE "billing_payments"  (131.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.2ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:12:23', '2014-07-18 13:12:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:12:23', '2014-07-18 13:12:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:23', '2014-07-18 13:12:23', 980190962)  (136.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (154.2ms) DROP TABLE "billing_accounts"  (131.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.6ms) DROP TABLE "billing_charges"  (149.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (126.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (125.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.6ms) DROP TABLE "billing_payments"  (131.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.6ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:12:45', '2014-07-18 13:12:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:12:45', '2014-07-18 13:12:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:12:45', '2014-07-18 13:12:45', 980190962)  (143.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (174.6ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (131.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (124.1ms) DROP TABLE "billing_charges"  (134.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (115.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (114.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (123.4ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (122.7ms) DROP TABLE "profiles"  (131.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:13:47', '2014-07-18 13:13:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:13:47', '2014-07-18 13:13:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:13:47', '2014-07-18 13:13:47', 980190962)  (122.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (164.5ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.8ms) DROP TABLE "billing_charges"  (143.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.6ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (133.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.1ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:14:07', '2014-07-18 13:14:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:14:07', '2014-07-18 13:14:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:14:07', '2014-07-18 13:14:07', 980190962)  (135.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (152.1ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (122.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (132.7ms) DROP TABLE "billing_charges"  (143.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.5ms) DROP TABLE "billing_discounts"  (132.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (181.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.5ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (114.5ms) DROP TABLE "profiles"  (115.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:15:05', '2014-07-18 13:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:15:05', '2014-07-18 13:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:15:05', '2014-07-18 13:15:05', 980190962)  (138.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.1ms) DROP TABLE "billing_accounts"  (123.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.9ms) DROP TABLE "billing_charges"  (144.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (289.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (129.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.8ms) DROP TABLE "billing_discounts"  (131.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.0ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.5ms) DROP TABLE "billing_payments"  (131.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (114.8ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:16:11', '2014-07-18 13:16:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:16:11', '2014-07-18 13:16:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:16:11', '2014-07-18 13:16:11', 980190962)  (142.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (154.1ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.6ms) DROP TABLE "billing_charges"  (145.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (114.3ms) DROP TABLE "billing_discounts"  (123.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (122.2ms) DROP TABLE "billing_origins"  (140.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.8ms) DROP TABLE "billing_payments"  (131.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.6ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:27:43', '2014-07-18 13:27:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:27:43', '2014-07-18 13:27:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:27:43', '2014-07-18 13:27:43', 980190962)  (144.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962", "id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.6ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (131.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.8ms) DROP TABLE "billing_charges"  (135.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.8ms) DROP TABLE "billing_discounts"  (141.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (114.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (123.0ms) DROP TABLE "billing_origins"  (123.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.6ms) DROP TABLE "billing_payments"  (131.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.8ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:28:34', '2014-07-18 13:28:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:28:34', '2014-07-18 13:28:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:28:34', '2014-07-18 13:28:34', 980190962)  (160.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962", "id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.9ms) Completed 500 Internal Server Error in 21ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (163.6ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.9ms) DROP TABLE "billing_charges"  (135.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.0ms) DROP TABLE "billing_discounts"  (140.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.7ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.6ms) DROP TABLE "billing_payments"  (115.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (141.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.3ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:30:28', '2014-07-18 13:30:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:30:28', '2014-07-18 13:30:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:30:28', '2014-07-18 13:30:28', 980190962)  (139.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962", "id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (7.8ms) Completed 200 OK in 34ms (Views: 23.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (213.8ms) DROP TABLE "billing_accounts"  (123.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (122.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.4ms) DROP TABLE "billing_charges"  (135.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.6ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.3ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_payments"  (132.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:41:28', '2014-07-18 13:41:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:41:28', '2014-07-18 13:41:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:41:28', '2014-07-18 13:41:28', 980190962)  (151.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.7ms) DROP TABLE "billing_accounts"  (132.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.6ms) DROP TABLE "billing_charges"  (143.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.5ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.7ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (114.2ms) DROP TABLE "billing_payments"  (124.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.6ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:44:06', '2014-07-18 13:44:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:44:06', '2014-07-18 13:44:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:06', '2014-07-18 13:44:06', 980190962)  (129.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.1ms) DROP TABLE "billing_accounts"  (139.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (132.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (114.2ms) DROP TABLE "billing_charges"  (127.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.0ms) DROP TABLE "billing_discounts"  (131.7ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.3ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.8ms) DROP TABLE "billing_payments"  (131.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (116.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:44:33', '2014-07-18 13:44:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:44:33', '2014-07-18 13:44:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:33', '2014-07-18 13:44:33', 980190962)  (139.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (176.2ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (147.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.9ms) DROP TABLE "billing_charges"  (136.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.0ms) DROP TABLE "billing_discounts"  (140.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (124.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (129.4ms) DROP TABLE "billing_origins"  (125.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.4ms) DROP TABLE "billing_payments"  (131.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (150.6ms) DROP TABLE "profiles"  (129.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:44:56', '2014-07-18 13:44:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:44:56', '2014-07-18 13:44:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:44:56', '2014-07-18 13:44:56', 980190962)  (143.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.8ms) DROP TABLE "billing_accounts"  (132.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (132.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.4ms) DROP TABLE "billing_charges"  (136.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.4ms) DROP TABLE "billing_discounts"  (238.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (292.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (348.3ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.6ms) DROP TABLE "billing_payments"  (139.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (132.3ms) DROP TABLE "profiles"  (139.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:45:19', '2014-07-18 13:45:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:45:19', '2014-07-18 13:45:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:45:19', '2014-07-18 13:45:19', 980190962)  (143.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (165.3ms) DROP TABLE "billing_accounts"  (132.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (114.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (114.3ms) DROP TABLE "billing_charges"  (127.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.5ms) DROP TABLE "billing_discounts"  (131.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (140.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.1ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (105.9ms) DROP TABLE "profiles"  (107.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:49:45', '2014-07-18 13:49:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:49:45', '2014-07-18 13:49:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:49:45', '2014-07-18 13:49:45', 980190962)  (131.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (159.4ms) DROP TABLE "billing_accounts"  (131.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (132.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (142.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (130.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (131.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.4ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.9ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.9ms) DROP TABLE "billing_payments"  (139.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (123.9ms) DROP TABLE "profiles"  (123.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:50:13', '2014-07-18 13:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:50:13', '2014-07-18 13:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:50:13', '2014-07-18 13:50:13', 980190962)  (142.6ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (150.7ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.1ms) DROP TABLE "billing_charges"  (143.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (295.5ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.7ms) DROP TABLE "billing_origins"  (123.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payments"  (133.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.8ms) DROP TABLE "profiles"  (131.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:56:24', '2014-07-18 13:56:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:56:24', '2014-07-18 13:56:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:56:24', '2014-07-18 13:56:24', 980190962)  (138.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (154.0ms) DROP TABLE "billing_accounts"  (133.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.7ms) DROP TABLE "billing_charges"  (143.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.1ms) DROP TABLE "billing_discounts"  (139.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (132.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (122.8ms) DROP TABLE "billing_origins"  (123.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.3ms) DROP TABLE "billing_payments"  (131.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "profiles"  (149.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:58:06', '2014-07-18 13:58:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:58:06', '2014-07-18 13:58:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:58:06', '2014-07-18 13:58:06', 980190962)  (157.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (150.9ms) DROP TABLE "billing_accounts"  (123.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.5ms) DROP TABLE "billing_charges"  (129.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.0ms) DROP TABLE "billing_discounts"  (141.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.5ms) DROP TABLE "billing_origins"  (123.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.4ms) DROP TABLE "billing_payments"  (132.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.8ms) DROP TABLE "profiles"  (132.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:59:00', '2014-07-18 13:59:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:59:00', '2014-07-18 13:59:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:00', '2014-07-18 13:59:00', 980190962)  (140.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.1ms) DROP TABLE "billing_accounts"  (124.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (188.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (180.6ms) DROP TABLE "billing_charges"  (135.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.4ms) DROP TABLE "billing_discounts"  (140.2ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.9ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.7ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:59:27', '2014-07-18 13:59:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:59:27', '2014-07-18 13:59:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:27', '2014-07-18 13:59:27', 980190962)  (135.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (170.7ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.6ms) DROP TABLE "billing_charges"  (136.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.4ms) DROP TABLE "billing_discounts"  (133.3ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.3ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.6ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.9ms) DROP TABLE "profiles"  (131.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:59:54', '2014-07-18 13:59:54', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 13:59:54', '2014-07-18 13:59:54', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 13:59:54', '2014-07-18 13:59:54', 980190962)  (133.8ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (153.7ms) DROP TABLE "billing_accounts"  (132.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (131.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.1ms) DROP TABLE "billing_charges"  (319.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (139.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.1ms) DROP TABLE "billing_discounts"  (132.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.9ms) DROP TABLE "billing_payments"  (132.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (123.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (132.7ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:00:07', '2014-07-18 14:00:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:00:07', '2014-07-18 14:00:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:00:07', '2014-07-18 14:00:07', 980190962)  (136.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (156.5ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.7ms) DROP TABLE "billing_charges"  (144.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (141.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (139.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.6ms) DROP TABLE "billing_payments"  (131.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:01:04', '2014-07-18 14:01:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:01:04', '2014-07-18 14:01:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:04', '2014-07-18 14:01:04', 980190962)  (143.3ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (154.7ms) DROP TABLE "billing_accounts"  (123.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.5ms) DROP TABLE "billing_charges"  (136.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (139.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (132.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.4ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:01:15', '2014-07-18 14:01:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:01:15', '2014-07-18 14:01:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:01:15', '2014-07-18 14:01:15', 980190962)  (132.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (156.2ms) DROP TABLE "billing_accounts"  (123.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (123.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (123.7ms) DROP TABLE "billing_charges"  (135.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.8ms) DROP TABLE "billing_discounts"  (139.7ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.2ms) DROP TABLE "billing_origins"  (139.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.8ms) DROP TABLE "billing_payments"  (131.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.1ms) DROP TABLE "profiles"  (133.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:02:32', '2014-07-18 14:02:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:02:32', '2014-07-18 14:02:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:02:32', '2014-07-18 14:02:32', 980190962)  (141.7ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962", "id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.3ms) Completed 500 Internal Server Error in 22ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.5ms) DROP TABLE "billing_accounts"  (123.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.5ms) DROP TABLE "billing_charges"  (129.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (130.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (131.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (132.0ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.7ms) DROP TABLE "billing_origins"  (123.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.6ms) DROP TABLE "billing_payments"  (131.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:03:43', '2014-07-18 14:03:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:03:43', '2014-07-18 14:03:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:03:43', '2014-07-18 14:03:43', 980190962)  (135.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962", "id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (8.1ms) Completed 200 OK in 35ms (Views: 23.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (184.4ms) DROP TABLE "billing_accounts"  (132.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (126.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (129.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.7ms) DROP TABLE "billing_discounts"  (131.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (130.9ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.0ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_payments"  (139.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (125.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:04:03', '2014-07-18 14:04:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:04:03', '2014-07-18 14:04:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:04:03', '2014-07-18 14:04:03', 980190962)  (127.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 404 Not Found in 11ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 23ms (Views: 21.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (164.0ms) DROP TABLE "billing_accounts"  (132.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.4ms) select sqlite_version(*)  (130.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.8ms) DROP TABLE "billing_charges"  (143.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.9ms) DROP TABLE "billing_discounts"  (133.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.5ms) DROP TABLE "billing_origins"  (469.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.3ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.2ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:05:01', '2014-07-18 14:05:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:05:01', '2014-07-18 14:05:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:05:01', '2014-07-18 14:05:01', 980190962)  (143.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.1ms) Completed 200 OK in 37ms (Views: 26.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (168.3ms) DROP TABLE "billing_accounts"  (123.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.4ms) select sqlite_version(*)  (130.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (123.0ms) DROP TABLE "billing_charges"  (136.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (130.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.3ms) DROP TABLE "billing_origins"  (123.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.4ms) DROP TABLE "billing_payments"  (131.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.6ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:19:23', '2014-07-18 14:19:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:19:23', '2014-07-18 14:19:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:23', '2014-07-18 14:19:23', 980190962)  (135.7ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (8.2ms) Completed 200 OK in 34ms (Views: 23.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (349.8ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (132.2ms) DROP TABLE "billing_charges"  (144.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.8ms) DROP TABLE "billing_discounts"  (140.2ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (132.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.1ms) DROP TABLE "billing_payments"  (139.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.1ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:19:42', '2014-07-18 14:19:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:19:42', '2014-07-18 14:19:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:42', '2014-07-18 14:19:42', 980190962)  (129.6ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (6.9ms) Completed 200 OK in 30ms (Views: 20.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.4ms) DROP TABLE "billing_accounts"  (131.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (144.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (133.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.8ms) DROP TABLE "billing_payments"  (140.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:19:56', '2014-07-18 14:19:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:19:56', '2014-07-18 14:19:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:19:56', '2014-07-18 14:19:56', 980190962)  (151.6ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (7.3ms) Completed 200 OK in 32ms (Views: 21.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (157.9ms) DROP TABLE "billing_accounts"  (124.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (122.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.3ms) DROP TABLE "billing_charges"  (129.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (140.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.8ms) DROP TABLE "billing_discounts"  (321.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.7ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.0ms) DROP TABLE "billing_payments"  (131.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (221.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.7ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:20:16', '2014-07-18 14:20:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:20:16', '2014-07-18 14:20:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:20:16', '2014-07-18 14:20:16', 980190962)  (130.5ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.6ms) Completed 200 OK in 39ms (Views: 26.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (184.9ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (172.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.9ms) DROP TABLE "billing_charges"  (135.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.8ms) DROP TABLE "billing_discounts"  (148.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (164.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.8ms) DROP TABLE "billing_origins"  (133.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_payments"  (131.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.3ms) DROP TABLE "profiles"  (131.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:21:19', '2014-07-18 14:21:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:21:19', '2014-07-18 14:21:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:21:19', '2014-07-18 14:21:19', 980190962)  (131.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.9ms) Completed 500 Internal Server Error in 20ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 500 Internal Server Error in 4ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (152.3ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (136.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (157.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.5ms) DROP TABLE "billing_origins"  (140.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (156.8ms) DROP TABLE "billing_payments"  (131.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.2ms) DROP TABLE "profiles"  (131.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.6ms) DROP TABLE "billing_accounts"  (131.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (140.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.5ms) DROP TABLE "billing_charges"  (136.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (339.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.8ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (140.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (131.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.6ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:22:44', '2014-07-18 14:22:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:22:44', '2014-07-18 14:22:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:22:44', '2014-07-18 14:22:44', 980190962)  (132.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (6.9ms) Completed 200 OK in 30ms (Views: 21.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (170.0ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.6ms) DROP TABLE "billing_charges"  (135.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (129.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (123.2ms) DROP TABLE "billing_discounts"  (131.7ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (139.2ms) DROP TABLE "billing_origins"  (133.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_payments"  (139.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (254.1ms) DROP TABLE "profiles"  (132.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:23:06', '2014-07-18 14:23:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:23:06', '2014-07-18 14:23:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:06', '2014-07-18 14:23:06', 980190962)  (132.6ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (8.2ms) Completed 200 OK in 35ms (Views: 24.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.1ms) DROP TABLE "billing_accounts"  (131.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (145.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.7ms) DROP TABLE "billing_discounts"  (131.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.1ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.7ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.0ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.4ms) DROP TABLE "profiles"  (205.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:23:35', '2014-07-18 14:23:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:23:35', '2014-07-18 14:23:35', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:35', '2014-07-18 14:23:35', 980190962)  (140.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (7.9ms) Completed 200 OK in 35ms (Views: 25.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (152.7ms) DROP TABLE "billing_accounts"  (131.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (131.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.4ms) DROP TABLE "billing_charges"  (143.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.7ms) DROP TABLE "billing_discounts"  (140.1ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (123.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (124.0ms) DROP TABLE "billing_payments"  (131.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.0ms) DROP TABLE "profiles"  (131.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:23:44', '2014-07-18 14:23:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:23:44', '2014-07-18 14:23:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:23:44', '2014-07-18 14:23:44', 980190962)  (136.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.2ms) Completed 500 Internal Server Error in 20ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Completed 500 Internal Server Error in 5ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (157.1ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (136.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (139.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.3ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (132.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_payments"  (139.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (122.6ms) DROP TABLE "profiles"  (123.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:24:00', '2014-07-18 14:24:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:24:00', '2014-07-18 14:24:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:00', '2014-07-18 14:24:00', 980190962)  (136.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (7.3ms) Completed 200 OK in 33ms (Views: 22.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.5ms) DROP TABLE "billing_accounts"  (123.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (122.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (122.6ms) DROP TABLE "billing_charges"  (136.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (123.3ms) DROP TABLE "billing_discounts"  (139.7ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.2ms) DROP TABLE "billing_origins"  (131.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (132.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.4ms) DROP TABLE "profiles"  (403.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:24:25', '2014-07-18 14:24:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:24:25', '2014-07-18 14:24:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:25', '2014-07-18 14:24:25', 980190962)  (129.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (8.7ms) Completed 200 OK in 36ms (Views: 25.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (168.1ms) DROP TABLE "billing_accounts"  (131.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (140.5ms) DROP TABLE "billing_charges"  (159.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (122.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.4ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.0ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (140.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.7ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:24:42', '2014-07-18 14:24:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:24:42', '2014-07-18 14:24:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.2ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:24:42', '2014-07-18 14:24:42', 980190962)  (144.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (7.6ms) Completed 200 OK in 34ms (Views: 23.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (170.6ms) DROP TABLE "billing_accounts"  (131.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (132.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.0ms) DROP TABLE "billing_charges"  (143.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.7ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.5ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (221.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (164.0ms) DROP TABLE "profiles"  (133.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:37:22', '2014-07-18 14:37:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 14:37:22', '2014-07-18 14:37:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 14:37:22', '2014-07-18 14:37:22', 980190962)  (128.5ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (16.0ms) Completed 200 OK in 44ms (Views: 32.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (173.4ms) DROP TABLE "billing_accounts"  (151.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (147.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (132.7ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.9ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.6ms) DROP TABLE "billing_origins"  (132.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payments"  (147.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (132.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140718164841') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (128.2ms) DROP TABLE "billing_accounts"  (131.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.4ms) DROP TABLE "billing_charges"  (139.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (131.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (131.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (138.9ms) DROP TABLE "billing_discounts"  (148.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (179.9ms) DROP TABLE "billing_origins"  (148.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (132.7ms) DROP TABLE "billing_payments"  (140.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.3ms) DROP TABLE "profiles"  (123.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 18:37:16', '2014-07-18 18:37:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 18:37:16', '2014-07-18 18:37:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 18:37:16', '2014-07-18 18:37:16', 980190962)  (134.3ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (15.0ms) Completed 200 OK in 42ms (Views: 31.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.4ms) DROP TABLE "billing_accounts"  (151.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (147.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.4ms) DROP TABLE "billing_charges"  (131.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.0ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.6ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.5ms) DROP TABLE "billing_payments"  (141.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.8ms) DROP TABLE "profiles"  (131.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:28:25', '2014-07-18 19:28:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:28:25', '2014-07-18 19:28:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:28:25', '2014-07-18 19:28:25', 980190962)  (146.6ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (14.2ms) Completed 200 OK in 39ms (Views: 29.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 7.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.5ms) DROP TABLE "billing_accounts"  (137.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.1ms) select sqlite_version(*)  (139.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.6ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (140.8ms) DROP TABLE "billing_discounts"  (131.5ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.4ms) DROP TABLE "billing_origins"  (132.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.5ms) DROP TABLE "billing_payments"  (140.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.3ms) DROP TABLE "profiles"  (132.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:28:42', '2014-07-18 19:28:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:28:42', '2014-07-18 19:28:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:28:42', '2014-07-18 19:28:42', 980190962)  (130.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (15.0ms) Completed 200 OK in 42ms (Views: 31.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (168.2ms) DROP TABLE "billing_accounts"  (143.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (139.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.1ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.0ms) DROP TABLE "billing_discounts"  (148.5ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.1ms) DROP TABLE "billing_origins"  (132.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.6ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.1ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:29:47', '2014-07-18 19:29:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:29:47', '2014-07-18 19:29:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:29:47', '2014-07-18 19:29:47', 980190962)  (151.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.1ms) Completed 200 OK in 42ms (Views: 27.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 21ms (Views: 16.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (159.7ms) DROP TABLE "billing_accounts"  (135.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (146.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.5ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.4ms) DROP TABLE "billing_discounts"  (140.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.7ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.4ms) DROP TABLE "billing_origins"  (124.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.6ms) DROP TABLE "billing_payments"  (148.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.7ms) DROP TABLE "profiles"  (148.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:31:17', '2014-07-18 19:31:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:31:17', '2014-07-18 19:31:17', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:31:17', '2014-07-18 19:31:17', 980190962)  (154.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.4ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/discounts/new.html.erb within layouts/billing/application (21.7ms) Completed 200 OK in 48ms (Views: 37.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.9ms) DROP TABLE "billing_accounts"  (144.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (139.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (132.2ms) DROP TABLE "billing_charges"  (131.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.5ms) DROP TABLE "billing_discounts"  (156.3ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (156.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (139.0ms) DROP TABLE "billing_origins"  (131.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.0ms) DROP TABLE "billing_payments"  (148.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.8ms) DROP TABLE "profiles"  (131.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:31:44', '2014-07-18 19:31:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:31:44', '2014-07-18 19:31:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:31:44', '2014-07-18 19:31:44', 980190962)  (140.3ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.3ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/discounts/new.html.erb within layouts/billing/application (19.9ms) Completed 200 OK in 44ms (Views: 34.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (152.0ms) DROP TABLE "billing_accounts"  (159.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (138.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.7ms) DROP TABLE "billing_charges"  (140.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.2ms) DROP TABLE "billing_discounts"  (131.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.6ms) DROP TABLE "billing_origins"  (478.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:32:14', '2014-07-18 19:32:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:32:14', '2014-07-18 19:32:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:32:14', '2014-07-18 19:32:14', 980190962)  (136.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (15.1ms) Completed 200 OK in 43ms (Views: 31.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.2ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 8.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (153.2ms) DROP TABLE "billing_accounts"  (128.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (130.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.2ms) DROP TABLE "billing_charges"  (157.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.5ms) DROP TABLE "billing_discounts"  (156.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.3ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (122.5ms) DROP TABLE "billing_payments"  (131.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:32:41', '2014-07-18 19:32:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:32:41', '2014-07-18 19:32:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:32:41', '2014-07-18 19:32:41', 980190962)  (150.9ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.2ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/discounts/new.html.erb within layouts/billing/application (16.4ms) Completed 200 OK in 40ms (Views: 31.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (152.8ms) DROP TABLE "billing_accounts"  (145.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (138.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.9ms) DROP TABLE "billing_charges"  (140.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_discounts"  (148.2ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (131.8ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.8ms) DROP TABLE "billing_origins"  (131.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.8ms) DROP TABLE "profiles"  (131.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:39:18', '2014-07-18 19:39:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:39:18', '2014-07-18 19:39:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:39:18', '2014-07-18 19:39:18', 980190962)  (158.1ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (15.9ms) Completed 200 OK in 43ms (Views: 32.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (156.3ms) DROP TABLE "billing_accounts"  (144.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (139.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.5ms) DROP TABLE "billing_charges"  (148.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (130.5ms) DROP TABLE "billing_discounts"  (140.0ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (140.3ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (130.9ms) DROP TABLE "billing_origins"  (133.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (131.2ms) DROP TABLE "billing_payments"  (140.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:42:56', '2014-07-18 19:42:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:42:56', '2014-07-18 19:42:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:42:56', '2014-07-18 19:42:56', 980190962)  (131.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.3ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/discounts/new.html.erb within layouts/billing/application (20.9ms) Completed 200 OK in 46ms (Views: 36.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (146.0ms) DROP TABLE "billing_accounts"  (135.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (138.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.4ms) DROP TABLE "billing_charges"  (139.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.4ms) DROP TABLE "billing_discounts"  (139.8ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (123.2ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (132.6ms) DROP TABLE "billing_origins"  (132.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_payments"  (139.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.7ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:47:30', '2014-07-18 19:47:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:47:30', '2014-07-18 19:47:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:47:30', '2014-07-18 19:47:30', 980190962)  (139.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.2ms) Completed 200 OK in 41ms (Views: 27.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 15ms (Views: 10.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.2ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (176.3ms) DROP TABLE "billing_accounts"  (144.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (130.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (114.9ms) DROP TABLE "billing_charges"  (132.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (132.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (131.5ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.6ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.4ms) DROP TABLE "billing_payments"  (131.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (115.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (122.8ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:52:20', '2014-07-18 19:52:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:52:20', '2014-07-18 19:52:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:52:20', '2014-07-18 19:52:20', 980190962)  (130.7ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (14.7ms) Completed 200 OK in 41ms (Views: 30.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.2ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (143.7ms) DROP TABLE "billing_accounts"  (136.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (131.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (131.1ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (132.4ms) DROP TABLE "billing_discounts"  (139.9ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (139.5ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (131.2ms) DROP TABLE "billing_origins"  (131.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (140.0ms) DROP TABLE "billing_payments"  (377.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (115.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (114.3ms) DROP TABLE "profiles"  (132.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:53:50', '2014-07-18 19:53:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:53:50', '2014-07-18 19:53:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:53:50', '2014-07-18 19:53:50', 980190962)  (141.5ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (15.1ms) Completed 200 OK in 42ms (Views: 31.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.2ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (153.7ms) DROP TABLE "billing_accounts"  (134.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (130.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.6ms) DROP TABLE "billing_charges"  (140.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (114.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (129.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (139.1ms) DROP TABLE "billing_discounts"  (156.6ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (148.0ms) DROP TABLE "billing_origins"  (148.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (124.0ms) DROP TABLE "billing_payments"  (131.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (131.1ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:54:23', '2014-07-18 19:54:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 19:54:23', '2014-07-18 19:54:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 19:54:23', '2014-07-18 19:54:23', 980190962)  (139.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.4ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/discounts/new.html.erb within layouts/billing/application (21.8ms) Completed 200 OK in 48ms (Views: 37.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (459.7ms) DROP TABLE "billing_accounts"  (143.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (138.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (114.6ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (132.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.3ms) DROP TABLE "billing_discounts"  (123.4ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (131.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (147.5ms) DROP TABLE "billing_origins"  (141.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)  (114.6ms) DROP TABLE "billing_payments"  (115.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (114.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (283.3ms) DROP TABLE "profiles"  (144.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (114.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140718212116')  (132.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140718210349') ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (134.3ms) DROP TABLE "billing_accounts"  (123.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (122.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (116.0ms) DROP TABLE "billing_charges"  (115.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (114.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (114.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.4ms) DROP TABLE "billing_discounts"  (115.2ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (123.0ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (114.4ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (130.8ms) DROP TABLE "billing_payment_types"  (131.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)  (114.5ms) DROP TABLE "billing_payments"  (123.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (116.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (114.4ms) DROP TABLE "profiles"  (131.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-18 21:23:14', '2014-07-18 21:23:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-18 21:23:14', '2014-07-18 21:23:14', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 21:23:14', '2014-07-18 21:23:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-18 21:23:14', '2014-07-18 21:23:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-18 21:23:14', '2014-07-18 21:23:14', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-18 21:23:15', '2014-07-18 21:23:15', 980190962)  (149.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------------- Billing::DiscountTest: test_args_to_attributes_class_method ----------------------------------------------------------- Billing::Discount Load (0.5ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (14.5ms) Completed 200 OK in 40ms (Views: 30.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- Billing::PaymentTest: test_args_to_attributes_class_method ---------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 6.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (207.8ms) DROP TABLE "billing_accounts"  (145.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (138.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.7ms) DROP TABLE "billing_charges"  (123.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (130.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (122.4ms) DROP TABLE "billing_discounts"  (139.7ms) CREATE TABLE "billing_discounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_discounts_on_account_id" ON "billing_discounts" ("account_id")  (149.1ms) DROP TABLE "billing_origins"  (148.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (164.1ms) DROP TABLE "billing_payment_types"  (164.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (130.9ms) DROP TABLE "billing_payments"  (139.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (130.7ms) DROP TABLE "profiles"  (131.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 08:18:51', '2014-07-19 08:18:51', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 08:18:51', '2014-07-19 08:18:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_discounts" Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_discounts" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 08:18:51', '2014-07-19 08:18:51', 980190962)  (160.2ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::DiscountsControllerTest: test_should_get_new ----------------------------------------------------- Billing::Discount Load (0.2ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::DiscountsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/discounts/new.html.erb within layouts/billing/application (20.1ms) Completed 200 OK in 51ms (Views: 37.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- Billing::PaymentTest: test_args_to_attributes_class_method ---------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- Billing::DiscountTest: test_args_to_attributes_class_method ----------------------------------------------------------- Billing::Discount Load (0.1ms) SELECT "billing_discounts".* FROM "billing_discounts" WHERE "billing_discounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" ORDER BY "profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (174.2ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (130.6ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (165.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.5ms) DROP TABLE "billing_origins"  (148.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (188.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (171.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (138.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140719110412')  (150.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140719094023')  (132.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140719103621')  (148.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140719094033')  (132.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140719094418') ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.8ms) DROP TABLE "billing_accounts"  (171.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (180.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (213.1ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (156.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_profiles"  (156.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (165.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.7ms) DROP TABLE "billing_accounts"  (176.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (165.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.7ms) DROP TABLE "billing_origins"  (173.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.9ms) DROP TABLE "billing_profiles"  (166.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:07:47', '2014-07-19 11:07:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 11:07:47', '2014-07-19 11:07:47', 980190962)  (198.9ms) commit transaction  (0.3ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (40.0ms) Completed 200 OK in 157ms (Views: 100.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 78ms (Views: 74.6ms | ActiveRecord: 0.6ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 14ms (Views: 10.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------- Billing::PaymentTest: test_args_to_attributes_class_method ---------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- Billing::ModifierTest: test_args_to_attributes_class_method ----------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 13ms (Views: 8.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.9ms) DROP TABLE "billing_accounts"  (192.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (212.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (165.0ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (149.0ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (173.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 11:22:41', '2014-07-19 11:22:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 11:22:41', '2014-07-19 11:22:41', 980190962)  (179.5ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.6ms) Completed 200 OK in 55ms (Views: 41.4ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (504.7ms) DROP TABLE "billing_accounts"  (169.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (172.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (163.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.5ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.9ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (221.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (173.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_profiles"  (181.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (173.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 15:13:31', '2014-07-19 15:13:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 15:13:31', '2014-07-19 15:13:31', 980190962)  (165.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.4ms) Completed 200 OK in 53ms (Views: 36.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (432.3ms) DROP TABLE "billing_accounts"  (183.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.2ms) DROP TABLE "billing_charges"  (173.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (164.1ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (149.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.7ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.9ms) DROP TABLE "billing_plus"  (172.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:41', '2014-07-19 17:01:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:01:41', '2014-07-19 17:01:41', 980190962)  (168.1ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.8ms) Completed 200 OK in 56ms (Views: 41.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (186.3ms) DROP TABLE "billing_accounts"  (184.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.1ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.8ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.8ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_payment_types"  (214.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (180.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (246.2ms) DROP TABLE "profiles"  (173.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:01:58', '2014-07-19 17:01:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:01:58', '2014-07-19 17:01:58', 980190962)  (174.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (22.1ms) Completed 200 OK in 54ms (Views: 41.4ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 5.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (173.8ms) DROP TABLE "billing_accounts"  (175.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (171.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (172.0ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (173.3ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (419.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:06:34', '2014-07-19 17:06:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:06:34', '2014-07-19 17:06:34', 980190962)  (157.6ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (22.0ms) Completed 200 OK in 54ms (Views: 41.8ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.5ms) DROP TABLE "billing_accounts"  (168.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_origins"  (173.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payment_types"  (166.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "billing_tax_groups"  (156.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:00', '2014-07-19 17:07:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:07:00', '2014-07-19 17:07:00', 980190962)  (182.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.7ms) Completed 200 OK in 51ms (Views: 34.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.7ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:07:01.153891"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:07:01.153891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (143.5ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.2ms) DROP TABLE "billing_modifiers"  (172.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (157.2ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.8ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (181.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:07:35', '2014-07-19 17:07:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:07:35', '2014-07-19 17:07:35', 980190962)  (171.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.3ms) Completed 200 OK in 53ms (Views: 35.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.7ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 17ms (Views: 14.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:07:35.731312"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:07:35.731312"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (202.6ms) DROP TABLE "billing_accounts"  (184.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.8ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (182.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (173.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.1ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:08:09', '2014-07-19 17:08:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:08:09', '2014-07-19 17:08:09', 980190962)  (163.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.4ms) Completed 200 OK in 50ms (Views: 33.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:08:10.160048"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:08:10.160048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.0ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (180.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.5ms) DROP TABLE "billing_charges"  (156.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (146.9ms) DROP TABLE "billing_modifiers"  (156.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.2ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (166.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payments"  (181.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (164.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:09:46', '2014-07-19 17:09:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:09:46', '2014-07-19 17:09:46', 980190962)  (163.4ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (17.4ms) Completed 200 OK in 50ms (Views: 40.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:09:46.897958"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:09:46.897958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.9ms) DROP TABLE "billing_accounts"  (175.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (172.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.1ms) DROP TABLE "billing_charges"  (139.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.9ms) DROP TABLE "billing_modifiers"  (271.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (157.1ms) DROP TABLE "billing_payment_types"  (173.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.9ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:07', '2014-07-19 17:10:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:10:07', '2014-07-19 17:10:07', 980190962)  (191.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:10:07.492267"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:10:07.492267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (14.6ms) Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.0ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_modifiers"  (172.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (157.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (214.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.3ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:10:58', '2014-07-19 17:10:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:10:58', '2014-07-19 17:10:58', 980190962)  (165.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (25.3ms) Completed 200 OK in 55ms (Views: 43.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:10:59.094767"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:10:59.094767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (187.9ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.9ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (156.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.9ms) DROP TABLE "billing_origins"  (321.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.8ms) DROP TABLE "billing_plus"  (156.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (181.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.9ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.3ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.0ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:16:48', '2014-07-19 17:16:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962) SQLite3::SQLException: table billing_charges has no column named currency: INSERT INTO "billing_charges" ("price_cents", "currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:16:48', '2014-07-19 17:16:48', 980190962, 980190962)  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (221.0ms) DROP TABLE "billing_accounts"  (161.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (171.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.1ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (164.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payment_types"  (197.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_payments"  (165.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.4ms) DROP TABLE "profiles"  (157.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:17:26', '2014-07-19 17:17:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:17:26', '2014-07-19 17:17:26', 980190962)  (160.9ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.2ms) Completed 200 OK in 50ms (Views: 37.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (203.2ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (164.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.8ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.1ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (468.4ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:24:11', '2014-07-19 17:24:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:24:11', '2014-07-19 17:24:11', 980190962)  (164.8ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.1ms) Completed 200 OK in 49ms (Views: 32.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 23ms (Views: 20.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:24:12.003798"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:24:12.003798"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -460], ["charges_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:24:12.008790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.7ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (156.9ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (156.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (174.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:25:10', '2014-07-19 17:25:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:25:10', '2014-07-19 17:25:10', 980190962)  (175.7ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.2ms) Completed 200 OK in 54ms (Views: 40.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountTest: test_positive_total ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:25:11.246242"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 17:25:11.246242"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -460], ["charges_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:25:11.251657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (203.3ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (237.7ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (378.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.8ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_profiles"  (246.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:26:39', '2014-07-19 17:26:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:26:39', '2014-07-19 17:26:39', 980190962)  (182.5ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.2ms) Completed 200 OK in 49ms (Views: 33.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 13.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 7.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (168.5ms) DROP TABLE "billing_accounts"  (154.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payment_types"  (158.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.6ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (181.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:27:17', '2014-07-19 17:27:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:27:17', '2014-07-19 17:27:17', 980190962)  (165.9ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.6ms) Completed 200 OK in 55ms (Views: 40.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 7.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (244.3ms) DROP TABLE "billing_accounts"  (168.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (157.0ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (173.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.3ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (165.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:01', '2014-07-19 17:28:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:28:01', '2014-07-19 17:28:01', 980190962)  (163.7ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (25.1ms) Completed 200 OK in 54ms (Views: 43.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 7.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.2ms) DROP TABLE "billing_accounts"  (185.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (171.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (157.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (192.3ms) DROP TABLE "billing_profiles"  (160.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.6ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:28:32', '2014-07-19 17:28:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:28:32', '2014-07-19 17:28:32', 980190962)  (171.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.9ms) Completed 200 OK in 53ms (Views: 35.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 8.2ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 15ms (Views: 11.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 12ms (Views: 7.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (200.8ms) DROP TABLE "billing_accounts"  (168.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (140.3ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.7ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (149.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.0ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (181.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:12', '2014-07-19 17:29:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:29:12', '2014-07-19 17:29:12', 980190962)  (162.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (9.7ms) Completed 200 OK in 32ms (Views: 26.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 7.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (261.3ms) DROP TABLE "billing_accounts"  (168.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.9ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (254.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (227.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (292.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.1ms) DROP TABLE "billing_tax_groups"  (155.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.5ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:29:53', '2014-07-19 17:29:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:29:53', '2014-07-19 17:29:53', 980190962)  (166.3ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:29:53.983194"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:29:53.983194"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -460], ["charges_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:29:53.988484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.2ms) Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 6.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.1ms) DROP TABLE "billing_accounts"  (161.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.8ms) DROP TABLE "billing_charges"  (139.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (165.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("created_at", "updated_at", "id", "account_id") VALUES ('2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:30:22', '2014-07-19 17:30:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:30:22', '2014-07-19 17:30:22', 980190962)  (174.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.4ms) Completed 200 OK in 43ms (Views: 27.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 14ms (Views: 11.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:30:22.428992"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:30:22.428992"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -460], ["charges_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:30:22.433724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (178.8ms) DROP TABLE "billing_accounts"  (168.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (171.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.8ms) DROP TABLE "billing_charges"  (149.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.2ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (188.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (157.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.0ms) DROP TABLE "billing_tax_groups"  (329.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:32:08', '2014-07-19 17:32:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:32:08', '2014-07-19 17:32:08', 980190962)  (157.6ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (27.1ms) Completed 200 OK in 60ms (Views: 46.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:32:09.186076"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:32:09.186076"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:32:09.191072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (204.5ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.9ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (140.8ms) DROP TABLE "billing_payment_types"  (156.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (237.7ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (172.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:33:49', '2014-07-19 17:33:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:33:49', '2014-07-19 17:33:49', 980190962)  (276.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:33:49.495784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:33:49.503132"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:33:49.503132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (9.1ms) Completed 200 OK in 30ms (Views: 24.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (385.2ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.9ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (156.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.5ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.9ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:35:12', '2014-07-19 17:35:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:35:12', '2014-07-19 17:35:12', 980190962)  (155.1ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 54ms (Views: 40.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:35:12.856410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (209.5ms) DROP TABLE "billing_accounts"  (175.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (245.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.9ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (164.4ms) DROP TABLE "billing_payment_types"  (166.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:37:02', '2014-07-19 17:37:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:37:02', '2014-07-19 17:37:02', 980190962)  (165.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 55ms (Views: 40.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 8.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:37:02.550901"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (181.0ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.8ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.6ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:38:00', '2014-07-19 17:38:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:38:00', '2014-07-19 17:38:00', 980190962)  (163.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.6ms) Completed 200 OK in 64ms (Views: 50.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:38:00.475438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:38:00.483033"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:38:00.483033"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.4ms) DROP TABLE "billing_accounts"  (184.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.1ms) DROP TABLE "billing_charges"  (139.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (166.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.1ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payments"  (156.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (166.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (395.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (164.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (411.4ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (164.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_modifiers"  (172.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.0ms) DROP TABLE "billing_profiles"  (157.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:39:07', '2014-07-19 17:39:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:39:07', '2014-07-19 17:39:07', 980190962)  (162.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (20.0ms) Completed 200 OK in 56ms (Views: 41.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:39:07.961275"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:39:07.967018"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:39:07.967018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.4ms) DROP TABLE "billing_accounts"  (168.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.2ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (153.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_modifiers"  (164.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.7ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payment_types"  (166.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (173.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:23', '2014-07-19 17:40:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:40:23', '2014-07-19 17:40:23', 980190962)  (164.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.4ms) Completed 200 OK in 64ms (Views: 49.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:40:23.953964"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:40:23.960215"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:40:23.960215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.3ms) DROP TABLE "billing_accounts"  (167.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (180.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (148.5ms) DROP TABLE "billing_payment_types"  (181.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (164.1ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (181.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (165.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:40:38', '2014-07-19 17:40:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:40:38', '2014-07-19 17:40:38', 980190962)  (161.4ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (10.6ms) Completed 200 OK in 37ms (Views: 31.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 17ms (Views: 14.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (494.9ms) DROP TABLE "billing_accounts"  (259.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.3ms) DROP TABLE "billing_plus"  (166.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (140.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:43:28', '2014-07-19 17:43:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:43:28', '2014-07-19 17:43:28', 980190962)  (153.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:43:28.809383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:43:28.818059"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:43:28.818059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (12.7ms) Completed 200 OK in 37ms (Views: 31.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.6ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.6ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (246.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (156.9ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:44:54', '2014-07-19 17:44:54', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:44:54', '2014-07-19 17:44:54', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:44:55', '2014-07-19 17:44:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:44:55', '2014-07-19 17:44:55', 980190962)  (174.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:44:55.269062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:44:55.277319"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:44:55.277319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (12.8ms) Completed 200 OK in 34ms (Views: 29.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 33ms (Views: 29.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.8ms) DROP TABLE "billing_accounts"  (159.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (165.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (230.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.1ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (174.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.3ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:15', '2014-07-19 17:45:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:45:15', '2014-07-19 17:45:15', 980190962)  (164.7ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.6ms) Completed 200 OK in 51ms (Views: 38.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 7.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:45:15.626600"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:45:15.632548"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:45:15.632548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (207.6ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (246.0ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (149.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.7ms) DROP TABLE "billing_plus"  (164.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (157.0ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:45:41', '2014-07-19 17:45:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:45:41', '2014-07-19 17:45:41', 980190962)  (164.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.4ms) Completed 200 OK in 40ms (Views: 27.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 21ms (Views: 18.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:45:42.069339"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:45:42.069339"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:45:42.074228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (150.3ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (180.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (165.1ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (362.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.5ms) DROP TABLE "billing_origins"  (238.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.8ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "billing_tax_groups"  (156.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:08', '2014-07-19 17:46:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:46:08', '2014-07-19 17:46:08', 980190962)  (165.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:46:08.922766"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:46:08.922766"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:46:08.928638"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (242.8ms) DROP TABLE "billing_accounts"  (177.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.1ms) DROP TABLE "billing_charges"  (148.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (156.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (157.2ms) DROP TABLE "billing_payments"  (156.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:46:34', '2014-07-19 17:46:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:46:34', '2014-07-19 17:46:34', 980190962)  (166.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.0ms) DROP TABLE "billing_accounts"  (190.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (165.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.5ms) DROP TABLE "billing_payment_types"  (165.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.0ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.8ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.4ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:47:04', '2014-07-19 17:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:47:04', '2014-07-19 17:47:04', 980190962)  (164.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.2ms) DROP TABLE "billing_accounts"  (168.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.4ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (157.0ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.1ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_payments"  (156.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (199.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:14', '2014-07-19 17:48:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:48:14', '2014-07-19 17:48:14', 980190962)  (159.6ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:48:14.645353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:48:14.649806"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:48:14.649806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (206.2ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.6ms) DROP TABLE "billing_charges"  (148.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (165.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (172.1ms) DROP TABLE "billing_plus"  (296.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.7ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (140.8ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 17:48:36', '2014-07-19 17:48:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 17:48:36', '2014-07-19 17:48:36', 980190962)  (162.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 17:48:37.029627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 17:48:37.035266"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 17:48:37.035266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.7ms) DROP TABLE "billing_accounts"  (169.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.5ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.0ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (157.2ms) DROP TABLE "billing_origins"  (155.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.6ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (156.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.1ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (206.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:03:48', '2014-07-19 18:03:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:03:48', '2014-07-19 18:03:48', 980190962)  (170.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:03:48.937371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:03:48.941653"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:03:48.941653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (157.0ms) DROP TABLE "billing_accounts"  (175.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (395.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (138.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (157.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (180.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.2ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.3ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "billing_tax_groups"  (157.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (164.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:04:05', '2014-07-19 18:04:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:04:05', '2014-07-19 18:04:05', 980190962)  (180.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:04:05.800849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (211.6ms) DROP TABLE "billing_accounts"  (513.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (171.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.9ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (303.6ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.1ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.8ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.9ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:05:55', '2014-07-19 18:05:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:05:55', '2014-07-19 18:05:55', 980190962)  (163.4ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:05:55.426096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.6ms) DROP TABLE "billing_accounts"  (169.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (180.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (271.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (149.1ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:27', '2014-07-19 18:06:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:06:27', '2014-07-19 18:06:27', 980190962)  (275.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:06:27.698366"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.5ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.7ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (205.1ms) DROP TABLE "billing_modifiers"  (164.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.1ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (164.2ms) DROP TABLE "billing_payment_types"  (165.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.9ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:06:55', '2014-07-19 18:06:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:06:55', '2014-07-19 18:06:55', 980190962)  (356.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:06:55.769663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:06:55.776080"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:06:55.776080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.8ms) DROP TABLE "billing_accounts"  (160.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.6ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (149.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.7ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (157.2ms) DROP TABLE "billing_profiles"  (173.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_tax_groups"  (156.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:07:57', '2014-07-19 18:07:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:07:57', '2014-07-19 18:07:57', 980190962)  (167.4ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:07:58.137173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:07:58.141653"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:07:58.141653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (174.3ms) DROP TABLE "billing_accounts"  (161.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.6ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (295.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.4ms) DROP TABLE "billing_origins"  (149.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.1ms) DROP TABLE "billing_payment_types"  (395.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (165.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.3ms) DROP TABLE "profiles"  (149.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:08:38', '2014-07-19 18:08:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:08:38', '2014-07-19 18:08:38', 980190962)  (164.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:08:38.691335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 340], ["discounts_sum_cents", 500], ["total_cents", -40], ["updated_at", "2014-07-19 18:08:38.701608"]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:08:38.703044"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:08:38.703044"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (178.1ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (199.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (149.5ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:10', '2014-07-19 18:09:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:09:10', '2014-07-19 18:09:10', 980190962)  (153.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:09:10.572082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:09:10.577327"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:09:10.577327"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 340], ["discounts_sum_cents", 500], ["total_cents", -40], ["updated_at", "2014-07-19 18:09:10.582918"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:09:10.577327"], ["fixed_value_cents", -500], ["id", 980190963], ["updated_at", "2014-07-19 18:09:10.577327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (283.4ms) DROP TABLE "billing_accounts"  (175.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (157.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.3ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.6ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:09:51', '2014-07-19 18:09:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:09:51', '2014-07-19 18:09:51', 980190962)  (163.8ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:09:51.580096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:09:51.585323"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:09:51.585323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.4ms) DROP TABLE "billing_accounts"  (167.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (149.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (262.9ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (164.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (164.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (180.4ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (166.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:14:57', '2014-07-19 18:14:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:14:57', '2014-07-19 18:14:57', 980190962)  (167.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:14:57.475540"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:14:57.475540"]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.2ms) DROP TABLE "billing_accounts"  (160.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.6ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (173.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (254.1ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.3ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:15:32', '2014-07-19 18:15:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:15:32', '2014-07-19 18:15:32', 980190962)  (161.6ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:15:33.083667"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (178.1ms) DROP TABLE "billing_accounts"  (169.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.1ms) select sqlite_version(*)  (164.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (199.1ms) DROP TABLE "billing_charges"  (385.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.2ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (181.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.1ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (149.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:02', '2014-07-19 18:16:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:16:02', '2014-07-19 18:16:02', 980190962)  (183.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:16:02.796846"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:16:02.801186"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:16:02.801186"]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (181.9ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (173.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.1ms) DROP TABLE "billing_payment_types"  (156.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (264.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (354.7ms) DROP TABLE "billing_profiles"  (163.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (229.8ms) DROP TABLE "billing_tax_groups"  (172.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:16:35', '2014-07-19 18:16:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:16:35', '2014-07-19 18:16:35', 980190962)  (161.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:16:35.343709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:16:35.348415"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:16:35.348415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (187.7ms) DROP TABLE "billing_accounts"  (168.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (492.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.9ms) DROP TABLE "billing_charges"  (139.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (345.0ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.9ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (156.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:17:11', '2014-07-19 18:17:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:17:11', '2014-07-19 18:17:11', 980190962)  (183.1ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:17:11.464423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 340], ["discounts_sum_cents", 500], ["total_cents", -40], ["updated_at", "2014-07-19 18:17:11.472696"]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:17:11.474022"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:17:11.474022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (202.9ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.5ms) DROP TABLE "billing_charges"  (172.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (163.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (179.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (149.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.0ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (165.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.1ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:18:42', '2014-07-19 18:18:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:18:42', '2014-07-19 18:18:42', 980190962)  (163.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:18:42.537247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:18:42.541795"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:18:42.541795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.6ms) DROP TABLE "billing_accounts"  (160.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.8ms) DROP TABLE "billing_charges"  (148.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (172.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (165.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (149.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.5ms) DROP TABLE "billing_origins"  (148.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.8ms) DROP TABLE "billing_payment_types"  (157.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.2ms) DROP TABLE "billing_plus"  (156.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.9ms) DROP TABLE "billing_profiles"  (165.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.9ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (141.6ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:20:59', '2014-07-19 18:20:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:20:59', '2014-07-19 18:20:59', 980190962)  (168.6ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:20:59.823121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:20:59.827993"], ["fixed_value_cents", -500], ["updated_at", "2014-07-19 18:20:59.827993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.1ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.6ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (157.1ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.7ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (157.0ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:21:56', '2014-07-19 18:21:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:21:56', '2014-07-19 18:21:56', 980190962)  (163.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:21:56.588354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:21:56.593212"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:21:56.593212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.2ms) DROP TABLE "billing_accounts"  (169.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.1ms) select sqlite_version(*)  (164.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.4ms) DROP TABLE "billing_charges"  (263.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.3ms) DROP TABLE "billing_modifiers"  (165.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.8ms) DROP TABLE "billing_origins"  (156.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (164.6ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.9ms) DROP TABLE "billing_payments"  (156.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (156.4ms) DROP TABLE "billing_plus"  (157.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.5ms) DROP TABLE "billing_profiles"  (165.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.9ms) DROP TABLE "billing_tax_groups"  (166.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:22:10', '2014-07-19 18:22:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:22:10', '2014-07-19 18:22:10', 980190962)  (156.6ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:22:10.836842"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:22:10.840622"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:22:10.840622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.7ms) DROP TABLE "billing_accounts"  (167.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (163.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (157.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_modifiers"  (172.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (181.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:23:13', '2014-07-19 18:23:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:23:13', '2014-07-19 18:23:13', 980190962)  (163.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:23:13.889938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:23:13.896177"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:23:13.896177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.4ms) DROP TABLE "billing_accounts"  (183.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (179.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.8ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.1ms) DROP TABLE "billing_modifiers"  (164.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (165.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.6ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.6ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (165.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.8ms) DROP TABLE "billing_tax_groups"  (156.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:24:44', '2014-07-19 18:24:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:24:44', '2014-07-19 18:24:44', 980190962)  (164.2ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:24:44.443424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:24:44.449163"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:24:44.449163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (208.9ms) DROP TABLE "billing_accounts"  (334.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (171.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.1ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.1ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.9ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (173.2ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (164.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:26:36', '2014-07-19 18:26:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:26:36', '2014-07-19 18:26:36', 980190962)  (162.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:26:36.541498"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:26:36.546707"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:26:36.546707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.3ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (164.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.6ms) DROP TABLE "billing_payment_types"  (166.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.0ms) DROP TABLE "billing_payments"  (163.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (303.6ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.8ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:27:49', '2014-07-19 18:27:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:27:49', '2014-07-19 18:27:49', 980190962)  (168.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:27:49.733229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:27:49.740058"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:27:49.740058"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:27:49.747168"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:27:49.740058"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:27:49.740058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (177.4ms) DROP TABLE "billing_accounts"  (167.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.1ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (157.7ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.9ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (163.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (222.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (237.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:28:29', '2014-07-19 18:28:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:28:29', '2014-07-19 18:28:29', 980190962)  (158.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:28:30.174709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:28:30.179835"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:28:30.179835"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:28:30.185072"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:28:30.179835"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:28:30.179835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (213.1ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (163.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (230.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.7ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_payments"  (246.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.7ms) DROP TABLE "billing_tax_groups"  (230.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (149.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:04', '2014-07-19 18:29:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:29:04', '2014-07-19 18:29:04', 980190962)  (184.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:29:05.191749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:29:05.197288"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:29:05.197288"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:29:05.203314"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:29:05.197288"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:29:05.197288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.3ms) DROP TABLE "billing_accounts"  (168.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.6ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (166.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.9ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (156.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "profiles"  (205.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:29:24', '2014-07-19 18:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:29:24', '2014-07-19 18:29:24', 980190962)  (168.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:29:24.686910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:29:24.692089"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:29:24.692089"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:29:24.696954"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:29:24.692089"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:29:24.692089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (210.5ms) DROP TABLE "billing_accounts"  (159.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (165.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.8ms) DROP TABLE "billing_payment_types"  (156.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.7ms) DROP TABLE "billing_profiles"  (181.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (140.2ms) DROP TABLE "profiles"  (147.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:03', '2014-07-19 18:30:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:30:03', '2014-07-19 18:30:03', 980190962)  (152.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:30:04.161436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:30:04.166799"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:30:04.166799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (176.5ms) DROP TABLE "billing_accounts"  (175.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (180.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.6ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (148.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.0ms) DROP TABLE "billing_modifiers"  (156.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (476.4ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (180.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_profiles"  (157.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:30:52', '2014-07-19 18:30:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:30:52', '2014-07-19 18:30:52', 980190962)  (174.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:30:52.471234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:30:52.477128"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:30:52.477128"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:30:52.483067"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:30:52.477128"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:30:52.477128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (501.1ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (157.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.2ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (173.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:33:24', '2014-07-19 18:33:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:33:24', '2014-07-19 18:33:24', 980190962)  (195.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:33:24.391959"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:33:24.397646"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:33:24.397646"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:33:24.403672"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:33:24.397646"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:33:24.397646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.6ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.7ms) DROP TABLE "billing_charges"  (172.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (148.8ms) DROP TABLE "billing_modifiers"  (156.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (148.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (165.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.6ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:34:23', '2014-07-19 18:34:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:34:23', '2014-07-19 18:34:23', 980190962)  (162.4ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:34:23.299003"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:34:23.304867"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:34:23.304867"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:34:23.310316"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:34:23.304867"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:34:23.304867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.8ms) DROP TABLE "billing_accounts"  (167.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.5ms) DROP TABLE "billing_charges"  (149.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.4ms) DROP TABLE "billing_payment_types"  (165.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (221.5ms) DROP TABLE "billing_payments"  (156.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (157.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (181.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:03', '2014-07-19 18:35:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:35:03', '2014-07-19 18:35:03', 980190962)  (153.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:35:03.828512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:35:03.839828"]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:35:03.841537"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:35:03.841537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.3ms) DROP TABLE "billing_accounts"  (168.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (146.9ms) DROP TABLE "billing_modifiers"  (156.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (494.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374, 'Profile', 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:35:32', '2014-07-19 18:35:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:35:32', '2014-07-19 18:35:32', 980190962)  (162.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:35:32.461413"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:35:32.467427"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:35:32.467427"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 49840], ["discounts_sum_cents", 50000], ["total_cents", -49540], ["updated_at", "2014-07-19 18:35:32.473178"]] SQL (0.3ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 18:35:32.467427"], ["fixed_value_cents", -50000], ["id", 980190963], ["updated_at", "2014-07-19 18:35:32.467427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (211.0ms) DROP TABLE "billing_accounts"  (168.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (156.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.9ms) DROP TABLE "billing_payments"  (157.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (173.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:37:17', '2014-07-19 18:37:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:37:17', '2014-07-19 18:37:17', 980190962)  (154.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:37:17.841120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:37:17.845987"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:37:17.845987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.0ms) DROP TABLE "billing_accounts"  (168.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (228.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.4ms) DROP TABLE "billing_modifiers"  (172.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (165.2ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (230.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.2ms) DROP TABLE "billing_tax_groups"  (173.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (436.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:38:06', '2014-07-19 18:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:38:06', '2014-07-19 18:38:06', 980190962)  (178.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:38:07.019135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:38:07.023732"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:38:07.023732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.4ms) DROP TABLE "billing_accounts"  (160.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (180.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.7ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (140.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.0ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (197.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (140.5ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:39:09', '2014-07-19 18:39:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:39:09', '2014-07-19 18:39:09', 980190962)  (238.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:39:10.083618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:39:10.090389"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:39:10.090389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.4ms) DROP TABLE "billing_accounts"  (169.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.1ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.3ms) DROP TABLE "billing_payment_types"  (156.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (166.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (254.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.6ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (154.8ms) DROP TABLE "billing_profiles"  (164.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_tax_groups"  (230.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:44:29', '2014-07-19 18:44:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:44:29', '2014-07-19 18:44:29', 980190962)  (164.6ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:44:29.939118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:44:29.947442"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:44:29.947442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (234.4ms) DROP TABLE "billing_accounts"  (168.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.7ms) DROP TABLE "billing_charges"  (139.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.2ms) DROP TABLE "billing_origins"  (157.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:10', '2014-07-19 18:45:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:45:10', '2014-07-19 18:45:10', 980190962)  (160.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.9ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:45:11.107309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:45:11.114729"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:45:11.114729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.7ms) DROP TABLE "billing_accounts"  (168.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (156.8ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.3ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (166.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:45:53', '2014-07-19 18:45:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:45:53', '2014-07-19 18:45:53', 980190962)  (161.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:45:53.579230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 18:45:53.585413"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 18:45:53.585413"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.1ms) DROP TABLE "billing_accounts"  (167.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.3ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (173.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.3ms) DROP TABLE "billing_plus"  (205.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:46:25', '2014-07-19 18:46:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:46:25', '2014-07-19 18:46:25', 980190962)  (158.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:46:25.832076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.2ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (171.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.8ms) DROP TABLE "billing_charges"  (156.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (165.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.0ms) DROP TABLE "billing_profiles"  (157.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:47:10', '2014-07-19 18:47:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:47:10', '2014-07-19 18:47:10', 980190962)  (164.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:47:11.156136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (190.0ms) DROP TABLE "billing_accounts"  (167.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.8ms) DROP TABLE "billing_charges"  (141.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.1ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.3ms) DROP TABLE "billing_plus"  (156.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 18:48:00', '2014-07-19 18:48:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 18:48:00', '2014-07-19 18:48:00', 980190962)  (159.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 18:48:00.875247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (178.1ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.8ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (165.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (337.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (174.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.8ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:26:23', '2014-07-19 19:26:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:26:23', '2014-07-19 19:26:23', 980190962)  (166.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:26:23.868984"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (238.5ms) DROP TABLE "billing_accounts"  (175.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (180.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.7ms) DROP TABLE "billing_charges"  (149.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (165.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.3ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:06', '2014-07-19 19:27:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:27:06', '2014-07-19 19:27:06', 980190962)  (157.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:27:06.687311"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.7ms) DROP TABLE "billing_accounts"  (169.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (255.5ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (173.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_profiles"  (201.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (143.2ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:27:23', '2014-07-19 19:27:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:27:23', '2014-07-19 19:27:23', 980190962)  (155.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:27:23.482303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (186.4ms) DROP TABLE "billing_accounts"  (184.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.6ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (157.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (262.8ms) DROP TABLE "billing_payment_types"  (181.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:28:22', '2014-07-19 19:28:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:28:22', '2014-07-19 19:28:22', 980190962)  (164.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:28:22.411511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.7ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.9ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.8ms) DROP TABLE "billing_payment_types"  (156.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.3ms) DROP TABLE "billing_payments"  (164.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (182.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (172.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (196.7ms) DROP TABLE "profiles"  (156.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:29:18', '2014-07-19 19:29:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:29:18', '2014-07-19 19:29:18', 980190962)  (166.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:29:18.779967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.4ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (163.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (139.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (149.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (509.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (157.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:22', '2014-07-19 19:32:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:32:22', '2014-07-19 19:32:22', 980190962)  (160.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:32:22.590769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (178.6ms) DROP TABLE "billing_accounts"  (183.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (170.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.8ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.8ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (188.5ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:32:48', '2014-07-19 19:32:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:32:48', '2014-07-19 19:32:48', 980190962)  (166.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:32:49.016806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:32:49.026337"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:32:49.026337"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.9ms) DROP TABLE "billing_accounts"  (159.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.1ms) DROP TABLE "billing_modifiers"  (172.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payment_types"  (157.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (156.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (157.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:33:45', '2014-07-19 19:33:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:33:45', '2014-07-19 19:33:45', 980190962)  (159.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:33:46.123110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:33:46.133292"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:33:46.133292"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (207.0ms) DROP TABLE "billing_accounts"  (168.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.9ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (148.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (157.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:34:08', '2014-07-19 19:34:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:34:08', '2014-07-19 19:34:08', 980190962)  (162.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:34:08.913415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:34:08.923383"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:34:08.923383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.8ms) DROP TABLE "billing_accounts"  (249.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.7ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.2ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.2ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.2ms) DROP TABLE "billing_payment_types"  (158.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:06', '2014-07-19 19:38:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:38:06', '2014-07-19 19:38:06', 980190962)  (165.6ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:38:06.427855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.1ms) DROP TABLE "billing_accounts"  (183.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (149.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.3ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (165.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (204.4ms) DROP TABLE "billing_tax_groups"  (156.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.3ms) DROP TABLE "profiles"  (157.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:42', '2014-07-19 19:38:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:38:42', '2014-07-19 19:38:42', 980190962)  (164.4ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:38:42.476099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:38:42.486786"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:38:42.486786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (203.4ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.8ms) DROP TABLE "billing_charges"  (139.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.8ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (146.8ms) DROP TABLE "billing_payments"  (156.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (440.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (153.1ms) DROP TABLE "profiles"  (477.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:38:58', '2014-07-19 19:38:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:38:58', '2014-07-19 19:38:58', 980190962)  (158.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:38:58.919717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (228.9ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (169.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (157.7ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (163.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (140.5ms) DROP TABLE "billing_modifiers"  (156.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (468.3ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (172.3ms) DROP TABLE "billing_plus"  (164.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (157.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:20', '2014-07-19 19:39:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:39:20', '2014-07-19 19:39:20', 980190962)  (165.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:39:20.541651"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (216.7ms) DROP TABLE "billing_accounts"  (184.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (171.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.8ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (140.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.3ms) DROP TABLE "billing_modifiers"  (197.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (172.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (148.1ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (157.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:39:41', '2014-07-19 19:39:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:39:41', '2014-07-19 19:39:41', 980190962)  (177.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:39:42.219319"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (167.4ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.7ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_payment_types"  (156.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.1ms) DROP TABLE "billing_profiles"  (166.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (172.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:46:41', '2014-07-19 19:46:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:46:41', '2014-07-19 19:46:41', 980190962)  (164.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:46:42.033200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.6ms) DROP TABLE "billing_accounts"  (176.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.0ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.8ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.8ms) DROP TABLE "billing_origins"  (173.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.6ms) DROP TABLE "billing_payments"  (164.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "billing_tax_groups"  (172.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.2ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:47:53', '2014-07-19 19:47:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:47:53', '2014-07-19 19:47:53', 980190962)  (157.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:47:53.638838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:47:53.649813"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:47:53.649813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.6ms) DROP TABLE "billing_accounts"  (168.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (131.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (170.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (173.3ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (262.7ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (156.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (173.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.9ms) DROP TABLE "billing_profiles"  (424.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (481.2ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:48:32', '2014-07-19 19:48:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:48:32', '2014-07-19 19:48:32', 980190962)  (159.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:48:32.753146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:48:32.763919"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:48:32.763919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (176.4ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (163.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (149.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (146.9ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (164.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.3ms) DROP TABLE "billing_plus"  (149.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (146.9ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (181.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:49:31', '2014-07-19 19:49:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:49:31', '2014-07-19 19:49:31', 980190962)  (181.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:49:31.579466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.3ms) DROP TABLE "billing_accounts"  (160.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (180.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (164.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.4ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (165.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (164.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (181.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:50:14', '2014-07-19 19:50:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:50:14', '2014-07-19 19:50:14', 980190962)  (164.6ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:50:14.800533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:50:14.809684"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:50:14.809684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.1ms) DROP TABLE "billing_accounts"  (167.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (149.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (156.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (188.6ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.5ms) DROP TABLE "billing_plus"  (164.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.0ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:08', '2014-07-19 19:54:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:54:08', '2014-07-19 19:54:08', 980190962)  (164.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:54:09.143941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 19:54:09.150023"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 19:54:09.150023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.2ms) DROP TABLE "billing_accounts"  (160.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.8ms) DROP TABLE "billing_charges"  (180.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.7ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (246.1ms) DROP TABLE "billing_payments"  (165.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (164.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:54:39', '2014-07-19 19:54:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:54:39', '2014-07-19 19:54:39', 980190962)  (153.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:54:39.843235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.7ms) DROP TABLE "billing_accounts"  (175.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (196.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.7ms) DROP TABLE "billing_charges"  (139.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (156.9ms) DROP TABLE "billing_origins"  (156.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "profiles"  (157.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:55:27', '2014-07-19 19:55:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:55:27', '2014-07-19 19:55:27', 980190962)  (161.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:55:28.111971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (186.3ms) DROP TABLE "billing_accounts"  (168.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.8ms) DROP TABLE "billing_charges"  (165.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (271.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (180.3ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.7ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:14', '2014-07-19 19:56:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:56:14', '2014-07-19 19:56:14', 980190962)  (167.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:56:14.449614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (187.3ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_payment_types"  (156.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (156.8ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (173.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.8ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:56:57', '2014-07-19 19:56:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:56:57', '2014-07-19 19:56:57', 980190962)  (167.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:56:58.248339"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (165.9ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (213.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.6ms) DROP TABLE "billing_charges"  (180.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (180.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (173.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.9ms) DROP TABLE "billing_tax_groups"  (158.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 19:57:37', '2014-07-19 19:57:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 19:57:38', '2014-07-19 19:57:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 19:57:38', '2014-07-19 19:57:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:38', '2014-07-19 19:57:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:38', '2014-07-19 19:57:38', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:57:38', '2014-07-19 19:57:38', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 19:57:38', '2014-07-19 19:57:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:38', '2014-07-19 19:57:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 19:57:38', '2014-07-19 19:57:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 19:57:38', '2014-07-19 19:57:38', 980190962)  (178.5ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 19:57:38.281696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.8ms) DROP TABLE "billing_accounts"  (169.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.5ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (149.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.5ms) DROP TABLE "billing_origins"  (173.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.2ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_tax_groups"  (182.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:01', '2014-07-19 20:03:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:03:01', '2014-07-19 20:03:01', 980190962)  (163.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:03:01.865475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.0ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (197.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (164.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (165.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (173.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.8ms) DROP TABLE "billing_profiles"  (174.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:21', '2014-07-19 20:03:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:03:21', '2014-07-19 20:03:21', 980190962)  (155.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:03:21.780445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (208.7ms) DROP TABLE "billing_accounts"  (184.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (171.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.6ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (229.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (139.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (378.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (262.4ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.1ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.1ms) DROP TABLE "billing_profiles"  (157.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962, 'Profile', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:03:45', '2014-07-19 20:03:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:03:45', '2014-07-19 20:03:45', 980190962)  (166.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:03:45.396838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (175.3ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.8ms) DROP TABLE "billing_charges"  (157.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.6ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (312.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (157.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (172.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:04:47', '2014-07-19 20:04:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:04:47', '2014-07-19 20:04:47', 980190962)  (159.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:04:48.172775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.6ms) DROP TABLE "billing_accounts"  (177.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.2ms) DROP TABLE "billing_modifiers"  (156.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (196.8ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) DROP TABLE "billing_profiles"  (156.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (146.9ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:25', '2014-07-19 20:05:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:05:25', '2014-07-19 20:05:25', 980190962)  (178.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:05:26.253638"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (164.1ms) DROP TABLE "billing_accounts"  (176.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (162.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.8ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (172.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (174.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.0ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.3ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:05:56', '2014-07-19 20:05:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:05:56', '2014-07-19 20:05:56', 980190962)  (155.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:05:57.027232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:05:57.034175"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 20:05:57.034175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (206.7ms) DROP TABLE "billing_accounts"  (168.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.2ms) DROP TABLE "billing_charges"  (139.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (157.2ms) DROP TABLE "billing_origins"  (173.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (146.8ms) DROP TABLE "billing_payments"  (156.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.4ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.1ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_tax_groups"  (180.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962) Fixture Insert (0.3ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:19:32', '2014-07-19 20:19:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:19:32', '2014-07-19 20:19:32', 980190962)  (159.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:19:33.060080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (181.0ms) DROP TABLE "billing_accounts"  (258.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.6ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_modifiers"  (205.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.5ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.6ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (173.6ms) DROP TABLE "billing_tax_groups"  (173.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:20:09', '2014-07-19 20:20:09', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:20:09', '2014-07-19 20:20:09', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:10', '2014-07-19 20:20:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:10', '2014-07-19 20:20:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:20:10', '2014-07-19 20:20:10', 980190962)  (164.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:20:10.232171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.7ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (171.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.8ms) DROP TABLE "billing_charges"  (139.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.8ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.6ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (181.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.6ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:20:27', '2014-07-19 20:20:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:20:27', '2014-07-19 20:20:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:28', '2014-07-19 20:20:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:28', '2014-07-19 20:20:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:20:28', '2014-07-19 20:20:28', 980190962)  (162.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:20:28.257385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (177.6ms) DROP TABLE "billing_accounts"  (160.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.6ms) DROP TABLE "billing_charges"  (172.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (180.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_origins"  (148.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (173.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:20:46', '2014-07-19 20:20:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:20:46', '2014-07-19 20:20:46', 980190962)  (154.9ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:20:46.457398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (170.5ms) DROP TABLE "billing_accounts"  (184.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (179.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (148.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (180.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.3ms) DROP TABLE "billing_payments"  (403.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.7ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.8ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (164.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:21:15', '2014-07-19 20:21:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:21:15', '2014-07-19 20:21:15', 980190962)  (183.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:21:15.630395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (170.2ms) DROP TABLE "billing_accounts"  (160.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (171.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (172.3ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.7ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.4ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.3ms) DROP TABLE "billing_payments"  (172.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (166.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (172.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:43:44', '2014-07-19 20:43:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:43:44', '2014-07-19 20:43:44', 980190962)  (163.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:43:44.301091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.9ms) DROP TABLE "billing_accounts"  (168.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (140.1ms) DROP TABLE "billing_charges"  (139.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.2ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.6ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (146.9ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (238.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (165.0ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:44:36', '2014-07-19 20:44:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:44:36', '2014-07-19 20:44:36', 980190962)  (168.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:44:36.532220"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.1ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (228.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (165.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.3ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.3ms) DROP TABLE "billing_tax_groups"  (191.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:13', '2014-07-19 20:50:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:50:13', '2014-07-19 20:50:13', 980190962)  (156.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:50:14.247248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:50:14.259206"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 20:50:14.259206"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (458.1ms) DROP TABLE "billing_accounts"  (184.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (171.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.7ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (141.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (137.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.0ms) DROP TABLE "billing_modifiers"  (164.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.1ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.2ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.6ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:50:35', '2014-07-19 20:50:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:50:35', '2014-07-19 20:50:35', 980190962)  (193.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:50:35.935296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:50:35.947632"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 20:50:35.947632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (167.0ms) DROP TABLE "billing_accounts"  (159.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.2ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.0ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_payment_types"  (156.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (171.8ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (173.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.0ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:51:07', '2014-07-19 20:51:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:51:07', '2014-07-19 20:51:07', 980190962)  (153.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:51:07.742410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:51:07.754907"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 20:51:07.754907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (251.8ms) DROP TABLE "billing_accounts"  (183.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (165.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.1ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.3ms) DROP TABLE "billing_plus"  (148.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (247.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:53:38', '2014-07-19 20:53:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:53:38', '2014-07-19 20:53:38', 980190962)  (178.4ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:53:39.098579"], ["price_cents", 300], ["updated_at", "2014-07-19 20:53:39.098579"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:53:39.105553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:53:39.117990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:53:39.126572"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 20:53:39.126572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (198.5ms) DROP TABLE "billing_accounts"  (185.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.7ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (174.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.7ms) DROP TABLE "billing_profiles"  (180.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "profiles"  (148.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 20:58:27', '2014-07-19 20:58:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 20:58:27', '2014-07-19 20:58:27', 980190962)  (153.8ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 20:58:28.146183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 20:58:28.162176"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 20:58:28.162176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (459.1ms) DROP TABLE "billing_accounts"  (168.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.5ms) DROP TABLE "billing_charges"  (149.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (204.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (155.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_origins"  (148.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.6ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.0ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.3ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:03:15', '2014-07-19 21:03:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:03:15', '2014-07-19 21:03:15', 980190962)  (177.2ms) commit transaction  (0.3ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:03:15.519183"], ["price_cents", 300], ["updated_at", "2014-07-19 21:03:15.519183"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 21:03:15.526397"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 21:03:15.539295"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:03:15.549228"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 21:03:15.549228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.7ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (162.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (148.5ms) DROP TABLE "billing_charges"  (164.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (156.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (156.9ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (395.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.8ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:04:07', '2014-07-19 21:04:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:04:07', '2014-07-19 21:04:07', 980190962)  (178.0ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:04:07.302967"], ["price_cents", 300], ["updated_at", "2014-07-19 21:04:07.302967"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -520], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 220], ["total_cents", 820], ["updated_at", "2014-07-19 21:04:07.315783"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:04:07.302967"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:04:07.302967"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -520], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 220], ["total_cents", 820], ["updated_at", "2014-07-19 21:04:07.315783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 21:04:07.340414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:04:07.349791"], ["fixed_value_cents", -50000], ["updated_at", "2014-07-19 21:04:07.349791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.3ms) DROP TABLE "billing_accounts"  (168.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.6ms) DROP TABLE "billing_charges"  (139.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (165.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (229.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.2ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (312.8ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (0.2, '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:06:47', '2014-07-19 21:06:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:06:47', '2014-07-19 21:06:47', 980190962)  (156.0ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:06:47.332802"], ["price_cents", 300], ["updated_at", "2014-07-19 21:06:47.332802"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -520], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 220], ["total_cents", 820], ["updated_at", "2014-07-19 21:06:47.344584"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:06:47.332802"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:06:47.332802"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -520], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 220], ["total_cents", 820], ["updated_at", "2014-07-19 21:06:47.344584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -160], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 160], ["total_cents", 460], ["updated_at", "2014-07-19 21:06:47.367253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.2ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (162.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.1ms) DROP TABLE "billing_charges"  (157.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.3ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.9ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (179.9ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (149.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (255.0ms) DROP TABLE "profiles"  (173.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:08:42', '2014-07-19 21:08:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:08:42', '2014-07-19 21:08:42', 980190962)  (162.3ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:08:42.541724"], ["price_cents", 300], ["updated_at", "2014-07-19 21:08:42.541724"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:08:42.553657"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:08:42.541724"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:08:42.541724"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:08:42.553657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:08:42.577586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (190.1ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.4ms) DROP TABLE "billing_charges"  (139.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (165.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (173.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (156.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (165.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (172.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:10:38', '2014-07-19 21:10:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:10:38', '2014-07-19 21:10:38', 980190962)  (159.8ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:10:38.447752"], ["price_cents", 300], ["updated_at", "2014-07-19 21:10:38.447752"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:10:38.460765"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:10:38.447752"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:10:38.447752"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:10:38.460765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:10:38.486907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (198.3ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (163.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (154.9ms) DROP TABLE "billing_charges"  (172.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.7ms) DROP TABLE "billing_origins"  (148.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.7ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (140.3ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:12:41', '2014-07-19 21:12:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:12:41', '2014-07-19 21:12:41', 980190962)  (164.6ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:12:41.477404"], ["price_cents", 300], ["updated_at", "2014-07-19 21:12:41.477404"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:12:41.490435"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:12:41.477404"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:12:41.477404"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:12:41.490435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------ Billing::AccountTest: test_total_always_positive ------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:12:41.516250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (515.7ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (148.0ms) DROP TABLE "billing_charges"  (139.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (139.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.9ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (157.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:26', '2014-07-19 21:13:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:13:26', '2014-07-19 21:13:26', 980190962)  (167.7ms) commit transaction  (0.3ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:13:26.883311"], ["price_cents", 300], ["updated_at", "2014-07-19 21:13:26.883311"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:13:26.895978"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:13:26.883311"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:13:26.883311"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:13:26.895978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:13:26.919586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.1ms) DROP TABLE "billing_accounts"  (183.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.9ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (180.4ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (172.4ms) DROP TABLE "billing_plus"  (197.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (173.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:13:58', '2014-07-19 21:13:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:13:58', '2014-07-19 21:13:58', 980190962)  (164.7ms) commit transaction  (0.3ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:13:58.866071"], ["price_cents", 300], ["updated_at", "2014-07-19 21:13:58.866071"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:13:58.879199"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:13:58.866071"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:13:58.866071"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:13:58.879199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:13:58.904544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (181.1ms) DROP TABLE "billing_accounts"  (159.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.4ms) select sqlite_version(*)  (163.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.6ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (149.3ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.8ms) DROP TABLE "billing_plus"  (485.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (328.5ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (164.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:14:38', '2014-07-19 21:14:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:14:38', '2014-07-19 21:14:38', 980190962)  (165.3ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:14:38.517800"], ["price_cents", 300], ["updated_at", "2014-07-19 21:14:38.517800"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:14:38.530533"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:14:38.517800"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:14:38.517800"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:14:38.530533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:14:38.555315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (204.6ms) DROP TABLE "billing_accounts"  (168.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.6ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.7ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (157.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (148.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (174.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (229.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:02', '2014-07-19 21:15:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:15:02', '2014-07-19 21:15:02', 980190962)  (162.7ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:15:03.077671"], ["price_cents", 300], ["updated_at", "2014-07-19 21:15:03.077671"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:15:03.090694"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:15:03.077671"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:15:03.077671"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:15:03.090694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:15:03.115297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.2ms) DROP TABLE "billing_accounts"  (184.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (148.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.3ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.6ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (140.9ms) DROP TABLE "billing_profiles"  (157.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.7ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:15:48', '2014-07-19 21:15:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:15:48', '2014-07-19 21:15:48', 980190962)  (164.0ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:15:49.027317"], ["price_cents", 300], ["updated_at", "2014-07-19 21:15:49.027317"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:15:49.036825"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:15:49.027317"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:15:49.027317"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:15:49.036825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:15:49.056002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.4ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.8ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (188.8ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (156.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (468.7ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.4ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:16:13', '2014-07-19 21:16:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:16:13', '2014-07-19 21:16:13', 980190962)  (155.1ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:16:13.931691"], ["price_cents", 300], ["updated_at", "2014-07-19 21:16:13.931691"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:16:13.944452"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:16:13.931691"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:16:13.931691"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:16:13.944452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:16:13.968709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (255.6ms) DROP TABLE "billing_accounts"  (167.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (157.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (148.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.8ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (164.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (157.1ms) DROP TABLE "billing_profiles"  (173.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.4ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:17:49', '2014-07-19 21:17:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:17:49', '2014-07-19 21:17:49', 980190962)  (166.9ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:17:49.827839"], ["price_cents", 300], ["updated_at", "2014-07-19 21:17:49.827839"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:17:49.841037"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:17:49.827839"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:17:49.827839"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:17:49.841037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:17:49.869434"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:17:49.869434"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:17:49.880778"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:17:49.869434"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:17:49.869434"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:17:49.880778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:17:49.917993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.6ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (171.6ms) DROP TABLE "billing_charges"  (149.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (163.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.6ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (154.9ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:06', '2014-07-19 21:18:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:18:06', '2014-07-19 21:18:06', 980190962)  (162.9ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:18:06.534928"], ["price_cents", 300], ["updated_at", "2014-07-19 21:18:06.534928"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:18:06.547416"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:18:06.534928"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:18:06.534928"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:18:06.547416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:18:06.574936"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:18:06.574936"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:18:06.586031"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:18:06.574936"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:18:06.574936"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:18:06.586031"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:18:06.607575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.2ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.9ms) DROP TABLE "billing_charges"  (188.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_modifiers"  (147.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (131.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (164.0ms) DROP TABLE "billing_origins"  (157.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.2ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (237.6ms) DROP TABLE "billing_plus"  (642.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_profiles"  (156.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:18:50', '2014-07-19 21:18:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:18:50', '2014-07-19 21:18:50', 980190962)  (164.2ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:18:51.075487"], ["price_cents", 300], ["updated_at", "2014-07-19 21:18:51.075487"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:18:51.088638"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:18:51.075487"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:18:51.075487"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:18:51.088638"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:18:51.116411"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:18:51.116411"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:18:51.127528"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:18:51.116411"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:18:51.116411"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:18:51.127528"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:18:51.150582"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:18:51.150582"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:18:51.159761"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:18:51.150582"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:18:51.150582"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:18:51.159761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:18:51.178229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (173.8ms) DROP TABLE "billing_accounts"  (168.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.6ms) DROP TABLE "billing_charges"  (296.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (263.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (220.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.1ms) DROP TABLE "billing_modifiers"  (157.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (166.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:28:20', '2014-07-19 21:28:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:28:20', '2014-07-19 21:28:20', 980190962)  (163.8ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.8ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:28:20.309962"], ["price_cents", 300], ["updated_at", "2014-07-19 21:28:20.309962"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:28:20.323513"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:28:20.309962"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:28:20.309962"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:28:20.323513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:28:20.350850"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:28:20.350850"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:28:20.362223"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:28:20.350850"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:28:20.350850"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:28:20.362223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:28:20.395283"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:28:20.395283"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:28:20.404823"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:28:20.395283"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:28:20.395283"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:28:20.404823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:28:20.424256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.7ms) DROP TABLE "billing_accounts"  (159.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (149.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_origins"  (148.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.2ms) DROP TABLE "billing_payment_types"  (271.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (240.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:29:24', '2014-07-19 21:29:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:29:24', '2014-07-19 21:29:24', 980190962)  (262.3ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:29:25.242629"], ["price_cents", 300], ["updated_at", "2014-07-19 21:29:25.242629"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:29:25.255711"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:29:25.242629"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:29:25.242629"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:29:25.255711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:29:25.282910"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:29:25.282910"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:29:25.294230"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:29:25.282910"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:29:25.282910"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:29:25.294230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:29:25.319027"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:29:25.319027"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:29:25.328447"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:29:25.319027"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:29:25.319027"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:29:25.328447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:29:25.346677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.7ms) DROP TABLE "billing_accounts"  (168.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (172.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (147.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.4ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (156.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_profiles"  (157.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (229.8ms) DROP TABLE "profiles"  (165.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:13', '2014-07-19 21:32:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:32:13', '2014-07-19 21:32:13', 980190962)  (165.9ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:14.070837"], ["price_cents", 300], ["updated_at", "2014-07-19 21:32:14.070837"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:32:14.082883"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:14.070837"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:32:14.070837"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:32:14.082883"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:14.108991"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:32:14.108991"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:32:14.119871"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:14.108991"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:32:14.108991"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:32:14.119871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:14.152276"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:32:14.152276"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:32:14.161699"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:14.152276"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:32:14.152276"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:32:14.161699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:32:14.179401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.6ms) DROP TABLE "billing_accounts"  (166.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (155.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (138.9ms) DROP TABLE "billing_charges"  (149.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (238.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_payments"  (156.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (157.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (188.6ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.6ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:32:59', '2014-07-19 21:32:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:32:59', '2014-07-19 21:32:59', 980190962)  (153.6ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.382707"], ["price_cents", 300], ["updated_at", "2014-07-19 21:32:59.382707"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:32:59.395627"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.382707"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:32:59.382707"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:32:59.395627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.423486"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:32:59.423486"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:32:59.432612"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.423486"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:32:59.423486"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:32:59.432612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "updated_at", "value_cents") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.452012"], ["updated_at", "2014-07-19 21:32:59.452012"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:32:59.459702"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.452012"], ["id", 980190963], ["updated_at", "2014-07-19 21:32:59.452012"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:32:59.459702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.491127"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:32:59.491127"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:32:59.501073"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:32:59.491127"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:32:59.491127"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:32:59.501073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:32:59.520521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.9ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.6ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.5ms) DROP TABLE "billing_plus"  (148.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_profiles"  (173.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.5ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:33:19', '2014-07-19 21:33:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:33:19', '2014-07-19 21:33:19', 980190962)  (168.3ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.813323"], ["price_cents", 300], ["updated_at", "2014-07-19 21:33:19.813323"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:33:19.826100"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.813323"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:33:19.813323"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:33:19.826100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.854223"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:33:19.854223"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:33:19.864344"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.854223"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:33:19.854223"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:33:19.864344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "updated_at", "value_cents") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.893376"], ["updated_at", "2014-07-19 21:33:19.893376"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:33:19.902233"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.893376"], ["id", 980190963], ["updated_at", "2014-07-19 21:33:19.893376"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:33:19.902233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.922660"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:33:19.922660"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:33:19.931486"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:33:19.922660"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:33:19.922660"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:33:19.931486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:33:19.949409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (187.9ms) DROP TABLE "billing_accounts"  (154.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.1ms) select sqlite_version(*)  (166.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (154.7ms) DROP TABLE "billing_modifiers"  (164.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.0ms) DROP TABLE "billing_origins"  (165.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (147.7ms) DROP TABLE "billing_payments"  (149.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.9ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (154.9ms) DROP TABLE "billing_profiles"  (486.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.6ms) DROP TABLE "profiles"  (149.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-19 21:39:06', '2014-07-19 21:39:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-19 21:39:06', '2014-07-19 21:39:06', 980190962)  (153.6ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.109477"], ["price_cents", 300], ["updated_at", "2014-07-19 21:39:07.109477"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:39:07.118279"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.109477"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-19 21:39:07.109477"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-19 21:39:07.118279"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.138641"], ["fixed_value_cents", -100], ["updated_at", "2014-07-19 21:39:07.138641"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:39:07.147521"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.138641"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-19 21:39:07.138641"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-19 21:39:07.147521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "updated_at", "value_cents") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.168358"], ["updated_at", "2014-07-19 21:39:07.168358"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:39:07.176542"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.168358"], ["id", 980190963], ["updated_at", "2014-07-19 21:39:07.168358"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:39:07.176542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.197274"], ["fixed_value_cents", 100], ["updated_at", "2014-07-19 21:39:07.197274"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:39:07.210679"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-19 21:39:07.197274"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-19 21:39:07.197274"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-19 21:39:07.210679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-19 21:39:07.230247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (162.4ms) DROP TABLE "billing_accounts"  (177.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.5ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (173.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (212.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_origins"  (181.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (164.0ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (165.3ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (197.5ms) DROP TABLE "billing_plus"  (164.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.1ms) DROP TABLE "billing_tax_groups"  (181.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "profiles"  (164.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:49:55', '2014-07-20 10:49:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 10:49:55', '2014-07-20 10:49:55', 980190962)  (161.5ms) commit transaction  (0.3ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.143402"], ["price_cents", 300], ["updated_at", "2014-07-20 10:49:56.143402"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 10:49:56.156563"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.143402"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 10:49:56.143402"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 10:49:56.156563"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.184657"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 10:49:56.184657"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 10:49:56.196326"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.184657"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 10:49:56.184657"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 10:49:56.196326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "updated_at", "value_cents") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.219935"], ["updated_at", "2014-07-20 10:49:56.219935"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:49:56.228530"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.219935"], ["id", 980190963], ["updated_at", "2014-07-20 10:49:56.219935"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:49:56.228530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.247879"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 10:49:56.247879"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 10:49:56.257450"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:49:56.247879"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 10:49:56.247879"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 10:49:56.257450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:49:56.275845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (200.3ms) DROP TABLE "billing_accounts"  (159.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (180.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.8ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (188.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (175.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (210.2ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.9ms) DROP TABLE "billing_origins"  (149.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (166.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (203.0ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_tax_groups"  (156.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.9ms) DROP TABLE "profiles"  (181.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:51:24', '2014-07-20 10:51:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 10:51:24', '2014-07-20 10:51:24', 980190962)  (164.5ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.812551"], ["price_cents", 300], ["updated_at", "2014-07-20 10:51:24.812551"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 10:51:24.825716"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.812551"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 10:51:24.812551"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 10:51:24.825716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.854008"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 10:51:24.854008"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 10:51:24.865503"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.854008"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 10:51:24.854008"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 10:51:24.865503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "updated_at", "value_cents") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.889187"], ["updated_at", "2014-07-20 10:51:24.889187"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:51:24.898175"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.889187"], ["id", 980190963], ["updated_at", "2014-07-20 10:51:24.889187"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:51:24.898175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.917930"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 10:51:24.917930"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 10:51:24.926557"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:51:24.917930"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 10:51:24.917930"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 10:51:24.926557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:51:24.945918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.0ms) DROP TABLE "billing_accounts"  (175.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (164.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (164.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (186.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (166.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime)   (163.4ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (205.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "profiles"  (164.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 10:52:22', '2014-07-20 10:52:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 10:52:22', '2014-07-20 10:52:22', 980190962)  (162.2ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:52:22.953848"], ["price_cents", 300], ["updated_at", "2014-07-20 10:52:22.953848"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 10:52:22.966595"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:52:22.953848"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 10:52:22.953848"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 10:52:22.966595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:52:22.992759"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 10:52:22.992759"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 10:52:23.003702"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:52:22.992759"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 10:52:22.992759"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 10:52:23.003702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "updated_at", "value_cents") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:52:23.027384"], ["updated_at", "2014-07-20 10:52:23.027384"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:52:23.036291"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:52:23.027384"], ["id", 980190963], ["updated_at", "2014-07-20 10:52:23.027384"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:52:23.036291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 10:52:23.056053"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 10:52:23.056053"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 10:52:23.064788"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 10:52:23.056053"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 10:52:23.056053"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 10:52:23.064788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 10:52:23.083709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (212.2ms) DROP TABLE "billing_accounts"  (184.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (179.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.9ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (181.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (164.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.8ms) DROP TABLE "billing_origins"  (173.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (196.7ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (157.0ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_tax_groups"  (176.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (267.5ms) DROP TABLE "profiles"  (173.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (220.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140720132559')  (131.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140720110811') ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (139.3ms) DROP TABLE "billing_accounts"  (163.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (163.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (172.3ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (165.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_modifiers"  (180.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_origins"  (148.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (148.0ms) DROP TABLE "billing_payment_types"  (181.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (164.1ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (175.1ms) DROP TABLE "billing_plus"  (360.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.8ms) DROP TABLE "billing_profiles"  (181.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.1ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:40:27', '2014-07-20 18:40:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 18:40:27', '2014-07-20 18:40:27', 980190962)  (170.9ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.6ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (19.3ms) Completed 200 OK in 48ms (Views: 36.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (195.5ms) DROP TABLE "billing_accounts"  (178.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (164.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.8ms) DROP TABLE "billing_charges"  (148.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_modifiers"  (205.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_origins"  (173.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_payment_types"  (173.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (156.8ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (172.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.7ms) DROP TABLE "billing_tax_groups"  (181.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.1ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:41:48', '2014-07-20 18:41:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 18:41:48', '2014-07-20 18:41:48', 980190962)  (154.1ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.5ms) Completed 200 OK in 51ms (Views: 34.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 22ms (Views: 18.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms)[0m SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.7ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (172.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (165.2ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (155.7ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_profiles"  (181.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (264.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:55:56', '2014-07-20 18:55:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 18:55:56', '2014-07-20 18:55:56', 980190962)  (156.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.9ms) Completed 200 OK in 52ms (Views: 35.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 24ms (Views: 20.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (240.1ms) DROP TABLE "billing_accounts"  (185.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (171.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.2ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (237.6ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (148.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.5ms) DROP TABLE "billing_origins"  (156.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.8ms) DROP TABLE "billing_payment_types"  (174.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (172.0ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (156.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (238.1ms) DROP TABLE "billing_plus"  (173.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.6ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "profiles"  (157.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:56:58', '2014-07-20 18:56:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 18:56:58', '2014-07-20 18:56:58', 980190962)  (184.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (24.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 28ms (Views: 24.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (154.1ms) DROP TABLE "billing_accounts"  (167.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.5ms) DROP TABLE "billing_charges"  (174.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_modifiers"  (172.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_origins"  (148.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (163.8ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (165.1ms) DROP TABLE "billing_plus"  (173.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.9ms) DROP TABLE "billing_profiles"  (181.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "profiles"  (164.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 18:59:52', '2014-07-20 18:59:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 18:59:52', '2014-07-20 18:59:52', 980190962)  (163.7ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 56ms (Views: 41.2ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 17ms (Views: 13.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 18:59:53.130973"], ["price_cents", 300], ["updated_at", "2014-07-20 18:59:53.130973"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 18:59:53.139811"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 18:59:53.130973"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 18:59:53.130973"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 18:59:53.139811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 18:59:53.161605"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 18:59:53.161605"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 18:59:53.193252"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 18:59:53.161605"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 18:59:53.161605"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 18:59:53.193252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 18:59:53.235514"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 18:59:53.235514"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 18:59:53.244173"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 18:59:53.235514"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 18:59:53.235514"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 18:59:53.244173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 18:59:53.262316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (200.8ms) DROP TABLE "billing_accounts"  (184.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (180.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.8ms) DROP TABLE "billing_charges"  (592.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (166.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.7ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (155.3ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (147.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (165.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.8ms) DROP TABLE "billing_profiles"  (173.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.7ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:11', '2014-07-20 19:02:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:02:11', '2014-07-20 19:02:11', 980190962)  (167.8ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (17.9ms) Completed 200 OK in 51ms (Views: 38.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:02:11.725709"], ["price_cents", 300], ["updated_at", "2014-07-20 19:02:11.725709"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:02:11.734136"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:02:11.725709"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:02:11.725709"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:02:11.734136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:02:11.754976"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:02:11.754976"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:02:11.763692"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:02:11.754976"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:02:11.754976"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:02:11.763692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:02:11.829421"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:02:11.829421"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:02:11.837910"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:02:11.829421"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:02:11.829421"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:02:11.837910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:02:11.854826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.5ms) DROP TABLE "billing_accounts"  (185.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.3ms) select sqlite_version(*)  (173.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.1ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (156.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (156.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (178.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (191.8ms) DROP TABLE "billing_payment_types"  (181.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (165.1ms) DROP TABLE "billing_payments"  (164.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (181.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "profiles"  (172.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:02:30', '2014-07-20 19:02:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:02:30', '2014-07-20 19:02:30', 980190962)  (180.5ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (10.9ms) Completed 200 OK in 50ms (Views: 34.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:02:30.559532"], ["price_cents", 300], ["updated_at", "2014-07-20 19:02:30.559532"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:02:30.568381"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:02:30.559532"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:02:30.559532"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:02:30.568381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:02:30.589193"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:02:30.589193"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:02:30.599457"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:02:30.589193"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:02:30.589193"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:02:30.599457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_payment ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:02:30.667242"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:02:30.667242"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:02:30.676208"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:02:30.667242"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:02:30.667242"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:02:30.676208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:02:30.693728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (208.4ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (0.2ms) select sqlite_version(*)  (157.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.3ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.7ms) DROP TABLE "billing_origins"  (173.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.6ms) DROP TABLE "billing_payment_types"  (181.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))   (163.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (157.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.9ms) DROP TABLE "profiles"  (172.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:03:46', '2014-07-20 19:03:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:03:46', '2014-07-20 19:03:46', 980190962)  (181.8ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.1ms) Completed 200 OK in 55ms (Views: 40.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:03:46.535973"], ["price_cents", 300], ["updated_at", "2014-07-20 19:03:46.535973"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:03:46.544467"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:03:46.535973"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:03:46.535973"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:03:46.544467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:03:46.587627"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:03:46.587627"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:03:46.596288"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:03:46.587627"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:03:46.587627"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:03:46.596288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:03:46.639326"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:03:46.639326"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:03:46.647679"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:03:46.639326"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:03:46.639326"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:03:46.647679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:03:46.665918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.6ms) DROP TABLE "billing_accounts"  (170.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (164.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (442.6ms) DROP TABLE "billing_charges"  (157.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (172.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_payment_types"  (181.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (180.4ms) DROP TABLE "billing_payments"  (166.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (173.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_tax_groups"  (181.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.9ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:05:12', '2014-07-20 19:05:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:05:12', '2014-07-20 19:05:12', 980190962)  (183.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (28.5ms) Completed 200 OK in 62ms (Views: 48.3ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.546217"], ["price_cents", 300], ["updated_at", "2014-07-20 19:05:12.546217"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:05:12.556495"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.546217"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:05:12.546217"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:05:12.556495"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.579275"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:05:12.579275"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:05:12.588844"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.579275"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:05:12.579275"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:05:12.588844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.641141"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:05:12.641141"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:05:12.649292"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.641141"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:05:12.641141"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:05:12.649292"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.668259"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:05:12.668259"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:05:12.676910"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:05:12.668259"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:05:12.668259"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:05:12.676910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:05:12.694152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.8ms) DROP TABLE "billing_accounts"  (168.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (179.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (172.2ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (163.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.3ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (173.3ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:06:50', '2014-07-20 19:06:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:06:50', '2014-07-20 19:06:50', 980190962)  (176.2ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (18.3ms) Completed 200 OK in 50ms (Views: 37.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.510246"], ["price_cents", 300], ["updated_at", "2014-07-20 19:06:50.510246"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:06:50.519465"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.510246"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:06:50.510246"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:06:50.519465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.540594"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:06:50.540594"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:06:50.549976"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.540594"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:06:50.540594"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:06:50.549976"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.603027"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:06:50.603027"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:06:50.611111"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.603027"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:06:50.603027"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:06:50.611111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.631987"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:06:50.631987"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:06:50.640549"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:06:50.631987"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:06:50.631987"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:06:50.640549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:06:50.657479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (208.7ms) DROP TABLE "billing_accounts"  (169.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (166.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.9ms) DROP TABLE "billing_payment_types"  (179.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (165.1ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.2ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (148.1ms) DROP TABLE "profiles"  (166.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:08', '2014-07-20 19:07:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:07:08', '2014-07-20 19:07:08', 980190962)  (164.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.1ms) Completed 200 OK in 63ms (Views: 49.4ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.209654"], ["price_cents", 300], ["updated_at", "2014-07-20 19:07:09.209654"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:07:09.218710"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.209654"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:07:09.209654"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:07:09.218710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.263685"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:07:09.263685"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:07:09.272964"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.263685"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:07:09.263685"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:07:09.272964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (35.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.339411"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:07:09.339411"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:07:09.348670"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.339411"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:07:09.339411"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:07:09.348670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.370622"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:07:09.370622"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:07:09.379824"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:09.370622"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:07:09.370622"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:07:09.379824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:07:09.397880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (183.7ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (171.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.5ms) DROP TABLE "billing_charges"  (165.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (164.1ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (155.4ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (173.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (165.3ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:07:56', '2014-07-20 19:07:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:07:56', '2014-07-20 19:07:56', 980190962)  (168.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.1ms) Completed 200 OK in 38ms (Views: 26.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 21ms (Views: 17.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.566273"], ["price_cents", 300], ["updated_at", "2014-07-20 19:07:56.566273"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:07:56.574837"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.566273"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:07:56.566273"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:07:56.574837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.595979"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:07:56.595979"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:07:56.605343"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.595979"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:07:56.595979"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:07:56.605343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.660006"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:07:56.660006"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:07:56.668309"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.660006"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:07:56.660006"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:07:56.668309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.687210"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:07:56.687210"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:07:56.696749"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:07:56.687210"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:07:56.687210"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:07:56.696749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:07:56.715634"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (183.3ms) DROP TABLE "billing_accounts"  (175.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.5ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (410.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (164.6ms) DROP TABLE "billing_origins"  (166.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_payment_types"  (172.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (162.9ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (172.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (164.1ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:08:26', '2014-07-20 19:08:26', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:08:27', '2014-07-20 19:08:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:08:27', '2014-07-20 19:08:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:27', '2014-07-20 19:08:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:27', '2014-07-20 19:08:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:08:27', '2014-07-20 19:08:27', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:08:27', '2014-07-20 19:08:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:27', '2014-07-20 19:08:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:08:27', '2014-07-20 19:08:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:08:27', '2014-07-20 19:08:27', 980190962)  (166.6ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.271110"], ["price_cents", 300], ["updated_at", "2014-07-20 19:08:27.271110"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:08:27.283859"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.271110"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:08:27.271110"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:08:27.283859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.312177"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:08:27.312177"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:08:27.323619"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.312177"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:08:27.312177"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:08:27.323619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.357317"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:08:27.357317"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:08:27.369595"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.357317"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:08:27.357317"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:08:27.369595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.389567"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:08:27.389567"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:08:27.399836"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:08:27.389567"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:08:27.389567"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:08:27.399836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:08:27.442915"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.3ms) Completed 200 OK in 23ms (Views: 18.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.9ms) DROP TABLE "billing_accounts"  (169.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (172.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (238.3ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_modifiers"  (179.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (273.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.9ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.8ms) DROP TABLE "billing_payment_types"  (238.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (155.4ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (173.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (164.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "billing_tax_groups"  (238.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:09:37', '2014-07-20 19:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:09:37', '2014-07-20 19:09:37', 980190962)  (161.3ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.738925"], ["price_cents", 300], ["updated_at", "2014-07-20 19:09:37.738925"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:09:37.752038"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.738925"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:09:37.738925"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["payments_sum_cents", 300], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:09:37.752038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.779348"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:09:37.779348"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:09:37.790551"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.779348"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:09:37.779348"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "discounts_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["discounts_sum_cents", 100], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 600], ["updated_at", "2014-07-20 19:09:37.790551"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.823084"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:09:37.823084"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:09:37.831650"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.823084"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:09:37.823084"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:09:37.831650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.852935"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:09:37.852935"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:09:37.862171"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:09:37.852935"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:09:37.852935"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:09:37.862171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:09:37.904776"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.7ms) Completed 200 OK in 28ms (Views: 23.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.1ms) DROP TABLE "billing_accounts"  (185.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (255.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.5ms) DROP TABLE "billing_charges"  (172.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.3ms) DROP TABLE "billing_modifiers"  (222.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.2ms) DROP TABLE "billing_origins"  (156.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (180.5ms) DROP TABLE "billing_payments"  (166.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "profiles"  (156.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:14:06', '2014-07-20 19:14:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:14:06', '2014-07-20 19:14:06', 980190962)  (162.7ms) commit transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:14:07.214092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.223578"], ["price_cents", 300], ["updated_at", "2014-07-20 19:14:07.223578"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:14:07.234150"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.223578"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:14:07.223578"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:14:07.234150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:14:07.258398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.265918"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:14:07.265918"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:14:07.275139"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.265918"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:14:07.265918"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:14:07.275139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:14:07.293869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.310371"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:14:07.310371"], ["value_cents", 700]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 300], ["payments_sum_cents", 1000], ["updated_at", "2014-07-20 19:14:07.317717"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.310371"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:14:07.310371"], ["value_cents", 700]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 300], ["payments_sum_cents", 1000], ["updated_at", "2014-07-20 19:14:07.317717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:14:07.335909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.365183"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:14:07.365183"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:14:07.373554"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:14:07.365183"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:14:07.365183"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:14:07.373554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:14:07.392313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (7.9ms) Completed 200 OK in 28ms (Views: 23.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.9ms) DROP TABLE "billing_accounts"  (185.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.9ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.4ms) DROP TABLE "billing_payment_types"  (182.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (172.8ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_profiles"  (165.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.0ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.2ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:15:57', '2014-07-20 19:15:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:15:57', '2014-07-20 19:15:57', 980190962)  (210.2ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (20.0ms) Completed 200 OK in 56ms (Views: 41.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:15:57.827813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.835750"], ["price_cents", 300], ["updated_at", "2014-07-20 19:15:57.835750"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:15:57.844746"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.835750"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:15:57.835750"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:15:57.844746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:15:57.862267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.868927"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:15:57.868927"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:15:57.877495"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.868927"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:15:57.868927"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:15:57.877495"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:15:57.917574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.934228"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:15:57.934228"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:15:57.941432"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.934228"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:15:57.934228"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:15:57.941432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:15:57.971992"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.978710"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:15:57.978710"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:15:57.988142"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:15:57.978710"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:15:57.978710"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:15:57.988142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:15:58.006419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (169.1ms) DROP TABLE "billing_accounts"  (168.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (172.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.4ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (156.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_modifiers"  (172.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (164.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.0ms) DROP TABLE "billing_origins"  (148.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (179.9ms) DROP TABLE "billing_payments"  (197.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (158.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.4ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:16:43', '2014-07-20 19:16:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:16:43', '2014-07-20 19:16:43', 980190962)  (181.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.6ms) Completed 200 OK in 49ms (Views: 36.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 15ms (Views: 12.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:16:43.577620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.584624"], ["price_cents", 300], ["updated_at", "2014-07-20 19:16:43.584624"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:16:43.592290"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.584624"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:16:43.584624"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:16:43.592290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:16:43.633540"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.639573"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:16:43.639573"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:16:43.647104"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.639573"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:16:43.639573"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:16:43.647104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:16:43.664703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.680056"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:16:43.680056"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:16:43.687757"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.680056"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:16:43.680056"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:16:43.687757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:16:43.703913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.710522"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:16:43.710522"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:16:43.719854"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:16:43.710522"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:16:43.710522"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:16:43.719854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:16:43.737732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (198.1ms) DROP TABLE "billing_accounts"  (176.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (164.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (165.4ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (146.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_payment_types"  (180.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (172.3ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (149.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.8ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.9ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_tax_groups"  (181.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:17:00', '2014-07-20 19:17:00', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:17:00', '2014-07-20 19:17:00', 980190962)  (182.0ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.8ms) Completed 200 OK in 54ms (Views: 40.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:17:01.269489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.277429"], ["price_cents", 300], ["updated_at", "2014-07-20 19:17:01.277429"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:17:01.285780"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.277429"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:17:01.277429"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:17:01.285780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:17:01.302341"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.310423"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:17:01.310423"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:17:01.319176"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.310423"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:17:01.310423"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:17:01.319176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:17:01.360118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.376468"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:17:01.376468"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:17:01.383729"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.376468"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:17:01.376468"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:17:01.383729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:17:01.399905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.405718"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:17:01.405718"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:17:01.413210"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:17:01.405718"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:17:01.405718"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:17:01.413210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:17:01.432345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.6ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.7ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (173.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_origins"  (173.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (180.3ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.9ms) DROP TABLE "billing_plus"  (174.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (188.3ms) DROP TABLE "billing_tax_groups"  (165.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-20 19:19:34', '2014-07-20 19:19:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-20 19:19:34', '2014-07-20 19:19:34', 980190962)  (176.2ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.8ms) Completed 200 OK in 54ms (Views: 39.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 16ms (Views: 13.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:19:34.520808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.527829"], ["price_cents", 300], ["updated_at", "2014-07-20 19:19:34.527829"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:19:34.536818"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.527829"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-20 19:19:34.527829"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-20 19:19:34.536818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:19:34.578152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.584291"], ["fixed_value_cents", -100], ["updated_at", "2014-07-20 19:19:34.584291"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:19:34.593707"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.584291"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-20 19:19:34.584291"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-20 19:19:34.593707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:19:34.610548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.624908"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:19:34.624908"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:19:34.631902"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.624908"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-20 19:19:34.624908"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-20 19:19:34.631902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:19:34.649925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.656222"], ["fixed_value_cents", 100], ["updated_at", "2014-07-20 19:19:34.656222"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:19:34.663887"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-20 19:19:34.656222"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-20 19:19:34.656222"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-20 19:19:34.663887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-20 19:19:34.680486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (53.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (165.8ms) DROP TABLE "billing_accounts"  (180.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (139.2ms) DROP TABLE "billing_charges"  (148.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.3ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (140.5ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (146.9ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (148.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_profiles"  (165.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.5ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (259.9ms) DROP TABLE "billing_accounts"  (167.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.1ms) DROP TABLE "billing_charges"  (156.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (172.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (130.6ms) DROP TABLE "billing_modifiers"  (139.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (164.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_payment_types"  (156.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.8ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (238.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_tax_groups"  (166.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (121.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140721173106')  (123.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140721172932') ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (153.1ms) DROP TABLE "billing_accounts"  (163.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (164.1ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (166.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_modifiers"  (147.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (205.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.0ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (180.0ms) DROP TABLE "billing_payments"  (206.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (140.4ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.6ms) DROP TABLE "profiles"  (156.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 19:40:39', '2014-07-21 19:40:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 19:40:39', '2014-07-21 19:40:39', 980190962)  (166.2ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.5ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 19:40:39.774517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 19:40:39.790337"], ["price_cents", 300], ["updated_at", "2014-07-21 19:40:39.790337"]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 19:40:39.807117"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 19:40:39.790337"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 19:40:39.790337"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 19:40:39.807117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 19:40:39.836315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 19:40:39.846646"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 19:40:39.846646"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 19:40:39.858414"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 19:40:39.846646"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 19:40:39.846646"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 19:40:39.858414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 19:40:39.881075"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 19:40:39.952524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 19:40:39.959022"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 19:40:39.959022"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 19:40:39.967043"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 19:40:39.959022"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 19:40:39.959022"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 19:40:39.967043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 19:40:39.983747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (7.3ms) Completed 200 OK in 137ms (Views: 102.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 34ms (Views: 31.5ms | ActiveRecord: 1.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 87ms (Views: 83.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 34ms (Views: 30.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 18ms (Views: 14.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.3ms) DROP TABLE "billing_accounts"  (168.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (156.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.3ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.7ms) DROP TABLE "billing_departments"  (156.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.7ms) DROP TABLE "billing_modifiers"  (140.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_operators"  (148.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (148.5ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (171.8ms) DROP TABLE "billing_payments"  (502.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:05:21', '2014-07-21 21:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:05:21', '2014-07-21 21:05:21', 980190962)  (177.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.4ms) Completed 200 OK in 51ms (Views: 38.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:05:22.069666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.077886"], ["price_cents", 300], ["updated_at", "2014-07-21 21:05:22.077886"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:05:22.086815"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.077886"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:05:22.077886"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:05:22.086815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:05:22.107074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.113930"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:05:22.113930"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:05:22.122245"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.113930"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:05:22.113930"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:05:22.122245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:05:22.149127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.163759"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:05:22.163759"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:05:22.170775"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.163759"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:05:22.163759"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:05:22.170775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:05:22.187677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.193514"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:05:22.193514"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:05:22.202640"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:05:22.193514"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:05:22.193514"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:05:22.202640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:05:22.220037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.9ms) DROP TABLE "billing_accounts"  (161.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (155.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.1ms) DROP TABLE "billing_charges"  (147.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (139.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.8ms) DROP TABLE "billing_modifiers"  (147.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (149.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (139.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_origins"  (156.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.6ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (157.0ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.1ms) DROP TABLE "profiles"  (140.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:06:18', '2014-07-21 21:06:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:06:18', '2014-07-21 21:06:18', 980190962)  (173.1ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.6ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (27.5ms) Completed 200 OK in 60ms (Views: 47.0ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:06:18.391522"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.398551"], ["price_cents", 300], ["updated_at", "2014-07-21 21:06:18.398551"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:06:18.431727"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.398551"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:06:18.398551"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:06:18.431727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:06:18.449699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.456145"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:06:18.456145"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:06:18.463991"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.456145"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:06:18.456145"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:06:18.463991"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:06:18.481101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.497149"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:06:18.497149"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:06:18.504511"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.497149"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:06:18.497149"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:06:18.504511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:06:18.521463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.527533"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:06:18.527533"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:06:18.534960"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:06:18.527533"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:06:18.527533"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:06:18.534960"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:06:18.553739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (174.1ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (171.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (163.7ms) DROP TABLE "billing_charges"  (149.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.2ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.8ms) DROP TABLE "billing_modifiers"  (138.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (148.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.6ms) DROP TABLE "billing_origins"  (156.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.1ms) DROP TABLE "billing_payment_types"  (156.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (165.5ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.8ms) DROP TABLE "billing_plus"  (148.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (196.9ms) DROP TABLE "billing_tax_groups"  (181.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (410.9ms) DROP TABLE "profiles"  (172.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:19', '2014-07-21 21:10:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:10:19', '2014-07-21 21:10:19', 980190962)  (177.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.8ms) Completed 200 OK in 53ms (Views: 35.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.7ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:20.170496"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.200775"], ["price_cents", 300], ["updated_at", "2014-07-21 21:10:20.200775"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:10:20.208795"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.200775"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:10:20.200775"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:10:20.208795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:20.227293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.233354"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:10:20.233354"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:10:20.240939"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.233354"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:10:20.233354"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:10:20.240939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:20.257912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.272631"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:10:20.272631"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:10:20.279655"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.272631"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:10:20.272631"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:10:20.279655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:20.296626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.302603"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:10:20.302603"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:10:20.310067"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:20.302603"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:10:20.302603"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:10:20.310067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:20.327676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.1ms) DROP TABLE "billing_accounts"  (161.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (147.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (148.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (262.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (181.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (655.3ms) DROP TABLE "billing_modifiers"  (199.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (141.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.1ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (146.9ms) DROP TABLE "billing_payment_types"  (173.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (164.0ms) DROP TABLE "billing_payments"  (164.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_profiles"  (181.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "billing_tax_groups"  (166.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:10:43', '2014-07-21 21:10:43', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:10:43', '2014-07-21 21:10:43', 980190962)  (177.0ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.4ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 980190962], ["created_at", "2014-07-21 21:10:43.879316"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:10:43.879316"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:10:43.892734"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 980190962], ["created_at", "2014-07-21 21:10:43.879316"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:10:43.879316"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:10:43.892734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (9.6ms) Completed 200 OK in 32ms (Views: 25.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:43.999739"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.006477"], ["price_cents", 300], ["updated_at", "2014-07-21 21:10:44.006477"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:10:44.014246"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.006477"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:10:44.006477"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:10:44.014246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:44.030998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.037108"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:10:44.037108"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:10:44.045407"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.037108"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:10:44.037108"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:10:44.045407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:44.063115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.077296"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:10:44.077296"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:10:44.084347"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.077296"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:10:44.077296"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:10:44.084347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:44.101644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.107788"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:10:44.107788"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:10:44.115630"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:10:44.107788"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:10:44.107788"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:10:44.115630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:10:44.132636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.4ms) DROP TABLE "billing_accounts"  (159.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (156.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.4ms) DROP TABLE "billing_departments"  (164.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (146.8ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (138.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (139.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (146.9ms) DROP TABLE "billing_payment_types"  (157.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.6ms) DROP TABLE "billing_payments"  (164.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.8ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.8ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:12:49', '2014-07-21 21:12:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:12:49', '2014-07-21 21:12:49', 980190962)  (169.3ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.9ms) Completed 200 OK in 56ms (Views: 41.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:12:49.367593"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.375614"], ["price_cents", 300], ["updated_at", "2014-07-21 21:12:49.375614"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:12:49.384212"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.375614"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:12:49.375614"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:12:49.384212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:12:49.402322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.409183"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:12:49.409183"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:12:49.417441"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.409183"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:12:49.409183"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:12:49.417441"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:12:49.459324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.473312"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:12:49.473312"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:12:49.480248"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.473312"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:12:49.473312"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:12:49.480248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:12:49.496399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.502367"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:12:49.502367"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:12:49.510861"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:12:49.502367"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:12:49.502367"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:12:49.510861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:12:49.528907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 980190962], ["created_at", "2014-07-21 21:12:49.616056"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:12:49.616056"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:12:49.625456"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 980190962], ["created_at", "2014-07-21 21:12:49.616056"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:12:49.616056"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:12:49.625456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.2ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (147.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (157.1ms) DROP TABLE "billing_charges"  (140.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (408.7ms) DROP TABLE "billing_departments"  (331.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_modifiers"  (147.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (149.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.4ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.8ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (156.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (156.9ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations" Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (167.4ms) DROP TABLE "billing_accounts"  (168.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.4ms) DROP TABLE "billing_charges"  (147.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (138.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.2ms) DROP TABLE "billing_departments"  (166.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (147.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.4ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (138.9ms) DROP TABLE "billing_payment_types"  (148.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (155.4ms) DROP TABLE "billing_payments"  (254.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.5ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (159.2ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_tax_groups"  (164.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:13:49', '2014-07-21 21:13:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:13:49', '2014-07-21 21:13:49', 980190962)  (177.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.7ms) Completed 200 OK in 64ms (Views: 50.5ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:13:49.965593"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:13:49.980740"], ["price_cents", 300], ["updated_at", "2014-07-21 21:13:49.980740"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:13:49.989004"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:13:49.980740"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:13:49.980740"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:13:49.989004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:13:50.008763"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:13:50.025291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:13:50.053623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:13:50.070643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (200.8ms) DROP TABLE "billing_accounts"  (241.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.8ms) DROP TABLE "billing_charges"  (148.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (156.8ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.9ms) DROP TABLE "billing_modifiers"  (139.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.9ms) DROP TABLE "billing_operators"  (148.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.6ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (180.1ms) DROP TABLE "billing_payments"  (164.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (149.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.3ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:15:56', '2014-07-21 21:15:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:15:56', '2014-07-21 21:15:56', 980190962)  (176.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.3ms) Completed 200 OK in 50ms (Views: 33.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:15:56.770233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:15:56.778713"], ["price_cents", 300], ["updated_at", "2014-07-21 21:15:56.778713"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:15:56.787445"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:15:56.778713"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:15:56.778713"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:15:56.787445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:15:56.806249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:15:56.819268"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:15:56.819268"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:15:56.836797"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:15:56.819268"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:15:56.819268"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:15:56.836797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:15:56.855338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:15:56.869973"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:15:56.869973"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:15:56.877575"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:15:56.869973"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:15:56.869973"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:15:56.877575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:15:56.894504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:15:56.902393"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:15:56.902393"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:15:56.910621"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:15:56.902393"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:15:56.902393"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:15:56.910621"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:15:56.929304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.8ms) DROP TABLE "billing_accounts"  (167.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.4ms) DROP TABLE "billing_charges"  (148.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (147.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (147.9ms) DROP TABLE "billing_departments"  (166.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_modifiers"  (148.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_operators"  (148.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_payment_types"  (148.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (155.3ms) DROP TABLE "billing_payments"  (156.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (147.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.8ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:17:40', '2014-07-21 21:17:40', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:17:40', '2014-07-21 21:17:40', 980190962)  (163.3ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.0ms) Completed 200 OK in 53ms (Views: 35.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 11.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:17:40.892432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:17:40.899922"], ["price_cents", 300], ["updated_at", "2014-07-21 21:17:40.899922"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:17:40.909075"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:17:40.899922"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:17:40.899922"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:17:40.909075"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:17:40.927173"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:17:40.946346"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:17:40.946346"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:17:40.956109"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:17:40.946346"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:17:40.946346"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:17:40.956109"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:17:40.974241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:17:40.988318"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:17:40.988318"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:17:40.995639"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:17:40.988318"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:17:40.988318"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:17:40.995639"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:17:41.013163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:17:41.021224"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:17:41.021224"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:17:41.030374"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:17:41.021224"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:17:41.021224"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:17:41.030374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:17:41.048601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (171.9ms) DROP TABLE "billing_accounts"  (168.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (156.3ms) DROP TABLE "billing_charges"  (230.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (139.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (146.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.3ms) DROP TABLE "billing_departments"  (164.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (150.0ms) DROP TABLE "billing_operators"  (148.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.9ms) DROP TABLE "billing_origins"  (148.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.0ms) DROP TABLE "billing_payment_types"  (148.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.7ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.8ms) DROP TABLE "billing_plus"  (173.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (148.3ms) DROP TABLE "billing_tax_groups"  (173.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:18:44', '2014-07-21 21:18:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:18:44', '2014-07-21 21:18:44', 980190962)  (174.6ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.6ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (10.0ms) Completed 200 OK in 33ms (Views: 27.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 16ms (Views: 13.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:18:45.065073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:18:45.072740"], ["price_cents", 300], ["updated_at", "2014-07-21 21:18:45.072740"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:18:45.081040"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:18:45.072740"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:18:45.072740"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:18:45.081040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:18:45.099064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:18:45.106956"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:18:45.106956"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:18:45.116349"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:18:45.106956"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:18:45.106956"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:18:45.116349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:18:45.136529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:18:45.150830"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:18:45.150830"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:18:45.158244"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:18:45.150830"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:18:45.150830"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:18:45.158244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:18:45.176477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:18:45.184283"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:18:45.184283"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:18:45.193520"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:18:45.184283"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:18:45.184283"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:18:45.193520"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:18:45.211492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (176.9ms) DROP TABLE "billing_accounts"  (175.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (171.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (146.6ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (213.2ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (138.9ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.6ms) DROP TABLE "billing_operators"  (147.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.0ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.6ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.2ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (156.7ms) DROP TABLE "billing_tax_groups"  (165.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:40:17', '2014-07-21 21:40:17', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:40:17', '2014-07-21 21:40:17', 980190962)  (173.9ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.6ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (16.7ms) Completed 200 OK in 48ms (Views: 35.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:40:17.665223"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:40:17.683062"], ["price_cents", 300], ["updated_at", "2014-07-21 21:40:17.683062"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:40:17.692179"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:40:17.683062"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:40:17.683062"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:40:17.692179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:40:17.710480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:40:17.718633"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:40:17.718633"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:40:17.727744"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:40:17.718633"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:40:17.718633"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:40:17.727744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:40:17.747661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:40:17.761848"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:40:17.761848"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:40:17.769138"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:40:17.761848"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:40:17.761848"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:40:17.769138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:40:17.785752"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:40:17.794410"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:40:17.794410"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:40:17.803626"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:40:17.794410"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:40:17.794410"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:40:17.803626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:40:17.821646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (176.8ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.2ms) select sqlite_version(*)  (155.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.2ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (130.6ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (139.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_origins"  (154.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.6ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (157.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (148.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.3ms) DROP TABLE "billing_profiles"  (347.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (170.3ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (147.5ms) DROP TABLE "profiles"  (164.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:14', '2014-07-21 21:43:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:43:14', '2014-07-21 21:43:14', 980190962)  (169.2ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:15.215484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:43:15.226321"], ["price_cents", 300], ["updated_at", "2014-07-21 21:43:15.226321"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:43:15.237861"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:43:15.226321"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:43:15.226321"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:43:15.237861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:15.260476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:15.275731"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:43:15.275731"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:43:15.289511"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:15.275731"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:43:15.275731"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:43:15.289511"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:15.309912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:43:15.326194"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:43:15.326194"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:43:15.333938"]] SQL (0.3ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:43:15.326194"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:43:15.326194"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:43:15.333938"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:15.359997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:15.368898"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:43:15.368898"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:43:15.377905"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:15.368898"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:43:15.368898"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:43:15.377905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:15.397572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (7.9ms) Completed 200 OK in 27ms (Views: 22.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (161.7ms) DROP TABLE "billing_accounts"  (152.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (146.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (148.0ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (168.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (258.0ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_modifiers"  (148.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (148.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.4ms) DROP TABLE "billing_origins"  (157.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_payment_types"  (156.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.6ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (164.2ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "profiles"  (157.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("master_id", "name", "tax_group_id", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', 1, NULL, '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:43:42', '2014-07-21 21:43:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:43:42', '2014-07-21 21:43:42', 980190962)  (169.6ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:43.001180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:43:43.012072"], ["price_cents", 300], ["updated_at", "2014-07-21 21:43:43.012072"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:43:43.023681"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:43:43.012072"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:43:43.012072"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:43:43.023681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:43.046184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:43.063105"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:43:43.063105"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:43:43.075366"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:43.063105"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:43:43.063105"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:43:43.075366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:43.095696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:43:43.111929"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:43:43.111929"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:43:43.121662"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:43:43.111929"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-21 21:43:43.111929"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-21 21:43:43.121662"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:43.146059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:43.154771"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:43:43.154771"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:43:43.164006"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:43:43.154771"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:43:43.154771"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:43:43.164006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:43:43.183243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.2ms) Completed 200 OK in 28ms (Views: 23.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.8ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (155.3ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (148.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.8ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.0ms) DROP TABLE "billing_modifiers"  (147.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (149.1ms) DROP TABLE "billing_operators"  (139.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_origins"  (165.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (163.8ms) DROP TABLE "billing_payments"  (164.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (148.5ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.4ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.2ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.0ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:56:52', '2014-07-21 21:56:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962) SQLite3::SQLException: table billing_departments has no column named tax_group: INSERT INTO "billing_departments" ("name", "tax_group", "type", "created_at", "updated_at", "id") VALUES ('Group1', 'one', NULL, '2014-07-21 21:56:52', '2014-07-21 21:56:52', 980190962)  (0.1ms) rollback transaction Billing::PaymentType Load (1.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (233.3ms) DROP TABLE "billing_accounts"  (167.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (147.0ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (156.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)   (139.2ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (148.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_origins"  (164.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (139.2ms) DROP TABLE "billing_payment_types"  (148.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255))  (155.4ms) DROP TABLE "billing_payments"  (149.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.4ms) DROP TABLE "billing_plus"  (156.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.7ms) DROP TABLE "billing_profiles"  (164.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.8ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (155.5ms) DROP TABLE "profiles"  (165.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-21 21:57:31', '2014-07-21 21:57:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-21 21:57:31', '2014-07-21 21:57:31', 980190962)  (168.6ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:57:31.432131"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-21 21:57:31.439822"], ["price_cents", 300], ["updated_at", "2014-07-21 21:57:31.439822"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:57:31.448582"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-21 21:57:31.439822"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-21 21:57:31.439822"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-21 21:57:31.448582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:57:31.467675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:57:31.476593"], ["fixed_value_cents", -100], ["updated_at", "2014-07-21 21:57:31.476593"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:57:31.486399"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:57:31.476593"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-21 21:57:31.476593"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-21 21:57:31.486399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:57:31.504953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:57:31.557844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:57:31.566474"], ["fixed_value_cents", 100], ["updated_at", "2014-07-21 21:57:31.566474"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:57:31.576063"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-21 21:57:31.566474"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-21 21:57:31.566474"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-21 21:57:31.576063"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-21 21:57:31.594900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (9.8ms) Completed 200 OK in 29ms (Views: 24.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (58.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.9ms) DROP TABLE "billing_accounts"  (175.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (171.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (172.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (148.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (147.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (138.9ms) DROP TABLE "billing_departments"  (156.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (139.0ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.6ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (138.8ms) DROP TABLE "billing_payment_types"  (246.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.9ms) DROP TABLE "billing_payments"  (148.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (139.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.1ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (213.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.4ms) DROP TABLE "billing_profiles"  (166.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.2ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (139.0ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (130.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140724173917')  (131.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140722160242')  (148.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140722160258')  (148.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140722161743')  (148.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140722160529')  (148.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140724173527')  (140.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140722162315')  (148.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140722160902') ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.1ms) DROP TABLE "billing_accounts"  (171.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (172.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.2ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)   (172.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (180.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.3ms) DROP TABLE "billing_departments"  (172.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (147.2ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (165.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (163.7ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')  (180.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.4ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.2ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (156.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (181.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (171.8ms) DROP TABLE "billing_tax_groups"  (189.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (155.4ms) DROP TABLE "profiles"  (205.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 17:47:22', '2014-07-24 17:47:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 17:47:22', '2014-07-24 17:47:22', 980190962)  (192.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.3ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.3ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (45.2ms) Completed 200 OK in 175ms (Views: 160.0ms | ActiveRecord: 0.9ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.4ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 51ms (Views: 46.7ms | ActiveRecord: 1.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.5ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 17:47:24.031625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 17:47:24.047276"], ["price_cents", 300], ["updated_at", "2014-07-24 17:47:24.047276"]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 17:47:24.060797"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 17:47:24.047276"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 17:47:24.047276"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 17:47:24.060797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 17:47:24.086051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 17:47:24.099720"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 17:47:24.099720"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 17:47:24.112040"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 17:47:24.099720"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 17:47:24.099720"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 17:47:24.112040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 17:47:24.134049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 17:47:24.175735"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 17:47:24.175735"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 17:47:24.183734"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 17:47:24.175735"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 17:47:24.175735"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 17:47:24.183734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 17:47:24.201315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 17:47:24.212532"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 17:47:24.212532"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 17:47:24.221755"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 17:47:24.212532"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 17:47:24.212532"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 17:47:24.221755"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 17:47:24.240218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 28ms (Views: 26.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 19ms (Views: 16.0ms | ActiveRecord: 1.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (168.8ms) DROP TABLE "billing_accounts"  (186.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (172.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (238.3ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (180.0ms) DROP TABLE "billing_departments"  (181.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (188.6ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.9ms) DROP TABLE "billing_operators"  (166.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) DROP TABLE "billing_origins"  (164.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.5ms) DROP TABLE "billing_payment_types"  (188.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.2ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (171.6ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.6ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (172.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:01:46', '2014-07-24 18:01:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:01:46', '2014-07-24 18:01:46', 980190962)  (205.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.3ms) Completed 200 OK in 55ms (Views: 40.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:01:47.173912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:01:47.181514"], ["price_cents", 300], ["updated_at", "2014-07-24 18:01:47.181514"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:01:47.189957"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:01:47.181514"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:01:47.181514"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:01:47.189957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:01:47.209903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:01:47.231175"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:01:47.231175"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:01:47.240941"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:01:47.231175"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:01:47.231175"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:01:47.240941"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:01:47.260432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:01:47.274517"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:01:47.274517"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:01:47.281608"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:01:47.274517"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:01:47.274517"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:01:47.281608"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:01:47.298352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:01:47.307682"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:01:47.307682"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:01:47.317156"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:01:47.307682"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:01:47.307682"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:01:47.317156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:01:47.335797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (159.5ms) DROP TABLE "billing_accounts"  (167.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (164.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (157.2ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (262.8ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (188.5ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.7ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.4ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (157.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.6ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.2ms) DROP TABLE "billing_payments"  (189.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.2ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (189.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (140.8ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962, 'Profile', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:02:10', '2014-07-24 18:02:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:02:10', '2014-07-24 18:02:10', 980190962)  (209.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.1ms) Completed 200 OK in 64ms (Views: 49.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:02:10.507431"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:02:10.514122"], ["price_cents", 300], ["updated_at", "2014-07-24 18:02:10.514122"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:02:10.521807"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:02:10.514122"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:02:10.514122"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:02:10.521807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:02:10.540542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:02:10.549579"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:02:10.549579"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:02:10.559241"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:02:10.549579"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:02:10.549579"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:02:10.559241"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:02:10.577265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:02:10.593240"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:02:10.593240"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:02:10.600429"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:02:10.593240"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:02:10.593240"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:02:10.600429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:02:10.617087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:02:10.625745"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:02:10.625745"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:02:10.636308"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:02:10.625745"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:02:10.625745"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:02:10.636308"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:02:10.654765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (197.5ms) DROP TABLE "billing_accounts"  (168.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.4ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (189.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (173.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (156.6ms) DROP TABLE "billing_modifiers"  (174.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.6ms) DROP TABLE "billing_operators"  (172.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (238.0ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (172.0ms) DROP TABLE "billing_payment_types"  (189.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.8ms) DROP TABLE "billing_plus"  (165.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (188.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.8ms) DROP TABLE "profiles"  (306.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:53:22', '2014-07-24 18:53:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:53:22', '2014-07-24 18:53:22', 980190962)  (193.1ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:53:22.750383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:53:22.760733"], ["price_cents", 300], ["updated_at", "2014-07-24 18:53:22.760733"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:53:22.771868"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:53:22.760733"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:53:22.760733"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:53:22.771868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:53:22.794117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:53:22.810083"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:53:22.810083"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:53:22.822756"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:53:22.810083"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:53:22.810083"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:53:22.822756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:53:22.843291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:53:22.891053"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:53:22.891053"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:53:22.898814"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:53:22.891053"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:53:22.891053"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:53:22.898814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:53:22.916659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:53:22.927314"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:53:22.927314"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:53:22.936359"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:53:22.927314"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:53:22.927314"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:53:22.936359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:53:22.954787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.1ms) Completed 200 OK in 29ms (Views: 24.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.9ms) DROP TABLE "billing_accounts"  (334.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.6ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (165.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_departments"  (345.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.3ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.6ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.4ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (163.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (156.7ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (130.7ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (172.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.2ms) DROP TABLE "profiles"  (158.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:54:51', '2014-07-24 18:54:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:54:51', '2014-07-24 18:54:51', 980190962)  (211.2ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 55ms (Views: 41.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 8.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Billing::AccountTest: test_account_should_have_origin_if_there_is_any_payments ------------------------------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:54:52.105057"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:54:52.121335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:54:52.127883"], ["price_cents", 300], ["updated_at", "2014-07-24 18:54:52.127883"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:54:52.136192"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:54:52.127883"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:54:52.127883"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:54:52.136192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:54:52.153791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:54:52.166528"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:54:52.166528"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:54:52.177233"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:54:52.166528"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:54:52.166528"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:54:52.177233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:54:52.196537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:54:52.211262"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:54:52.211262"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:54:52.218626"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:54:52.211262"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:54:52.211262"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:54:52.218626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:54:52.236134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:54:52.245796"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:54:52.245796"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:54:52.255328"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:54:52.245796"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:54:52.245796"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:54:52.255328"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:54:52.273510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.8ms) DROP TABLE "billing_accounts"  (160.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_departments"  (174.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.5ms) DROP TABLE "billing_modifiers"  (180.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (263.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.0ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.5ms) DROP TABLE "billing_payments"  (174.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (189.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.2ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.4ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:18', '2014-07-24 18:55:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:55:18', '2014-07-24 18:55:18', 980190962)  (190.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Billing::AccountTest: test_account_should_have_origin_if_there_is_any_payments ------------------------------------------------------------------------------ Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:19.195581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:19.217067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:55:19.225440"], ["price_cents", 300], ["updated_at", "2014-07-24 18:55:19.225440"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:55:19.235764"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:55:19.225440"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:55:19.225440"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:55:19.235764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:19.258648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:19.273588"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:55:19.273588"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:55:19.284614"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:19.273588"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:55:19.273588"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:55:19.284614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:19.305663"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:55:19.346563"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:55:19.346563"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:55:19.355340"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:55:19.346563"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:55:19.346563"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:55:19.355340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:19.373161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:19.382321"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:55:19.382321"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:55:19.391527"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:19.382321"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:55:19.382321"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:55:19.391527"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:19.411310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.1ms) Completed 200 OK in 22ms (Views: 18.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.4ms) DROP TABLE "billing_accounts"  (159.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (163.5ms) DROP TABLE "billing_charges"  (172.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (180.0ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.6ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.4ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.5ms) DROP TABLE "billing_origins"  (189.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (337.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (138.9ms) DROP TABLE "billing_payment_types"  (156.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.9ms) DROP TABLE "billing_plus"  (164.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.6ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.8ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:55:36', '2014-07-24 18:55:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:55:36', '2014-07-24 18:55:36', 980190962)  (192.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (26.6ms) Completed 200 OK in 59ms (Views: 46.2ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Billing::AccountTest: test_account_should_have_origin_if_there_is_any_payments ------------------------------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:36.498955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:36.515772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:55:36.521850"], ["price_cents", 300], ["updated_at", "2014-07-24 18:55:36.521850"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:55:36.529887"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:55:36.521850"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:55:36.521850"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:55:36.529887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:36.547768"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:36.558083"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:55:36.558083"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:55:36.568291"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:36.558083"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:55:36.558083"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:55:36.568291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:36.586477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:55:36.601289"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:55:36.601289"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:55:36.609015"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:55:36.601289"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:55:36.601289"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:55:36.609015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:36.626576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:36.635927"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:55:36.635927"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:55:36.645045"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:55:36.635927"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:55:36.635927"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:55:36.645045"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:55:36.663118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.7ms) DROP TABLE "billing_accounts"  (152.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (138.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (164.9ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.4ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.7ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (131.0ms) DROP TABLE "billing_operators"  (156.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (138.6ms) DROP TABLE "billing_origins"  (166.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.7ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (156.2ms) DROP TABLE "billing_plus"  (156.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (174.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 18:58:04', '2014-07-24 18:58:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 18:58:04', '2014-07-24 18:58:04', 980190962)  (189.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (12.2ms) Completed 200 OK in 36ms (Views: 29.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Billing::AccountTest: test_account_should_have_origin_if_there_is_any_payments ------------------------------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:58:04.777264"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "billing_accounts" SET "origin_id" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["origin_id", nil], ["updated_at", "2014-07-24 18:58:04.788569"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:58:04.868755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:58:04.877522"], ["price_cents", 300], ["updated_at", "2014-07-24 18:58:04.877522"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:58:04.888366"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:58:04.877522"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 18:58:04.877522"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 18:58:04.888366"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:58:04.910154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:58:04.920544"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 18:58:04.920544"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:58:04.931579"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:58:04.920544"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 18:58:04.920544"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 18:58:04.931579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:58:04.952357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 18:58:04.968421"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:58:04.968421"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:58:04.975988"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 18:58:04.968421"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 18:58:04.968421"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 18:58:04.975988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:58:04.993252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:58:05.002550"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 18:58:05.002550"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:58:05.012202"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 18:58:05.002550"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 18:58:05.002550"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 18:58:05.012202"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 18:58:05.031353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.2ms) DROP TABLE "billing_accounts"  (160.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (163.6ms) DROP TABLE "billing_charges"  (181.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (181.6ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.1ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (263.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.3ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.5ms) DROP TABLE "billing_payments"  (173.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.5ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.9ms) DROP TABLE "billing_profiles"  (156.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (164.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (156.3ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:28:18', '2014-07-24 19:28:18', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 19:28:18', '2014-07-24 19:28:18', 980190962)  (188.0ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.3ms) Completed 200 OK in 56ms (Views: 40.7ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:28:18.955355"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:28:18.968975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 19:28:18.975304"], ["price_cents", 300], ["updated_at", "2014-07-24 19:28:18.975304"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 19:28:18.983054"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 19:28:18.975304"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 19:28:18.975304"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 19:28:18.983054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:28:19.001242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:28:19.010820"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 19:28:19.010820"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 19:28:19.021506"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:28:19.010820"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 19:28:19.010820"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 19:28:19.021506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:28:19.040602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 19:28:19.054961"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 19:28:19.054961"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 19:28:19.062850"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 19:28:19.054961"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 19:28:19.054961"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 19:28:19.062850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:28:19.081089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:28:19.090000"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 19:28:19.090000"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 19:28:19.099780"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:28:19.090000"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 19:28:19.090000"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 19:28:19.099780"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:28:19.119778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (211.2ms) DROP TABLE "billing_accounts"  (158.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.3ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (173.6ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.5ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_operators"  (173.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.3ms) DROP TABLE "billing_origins"  (279.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.5ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (132.0ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:30:11', '2014-07-24 19:30:11', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 19:30:11', '2014-07-24 19:30:11', 980190962)  (185.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:30:11.696361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:30:11.713636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 19:30:11.720309"], ["price_cents", 300], ["updated_at", "2014-07-24 19:30:11.720309"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 19:30:11.728432"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 19:30:11.720309"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 19:30:11.720309"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 19:30:11.728432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:30:11.750372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:30:11.761311"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 19:30:11.761311"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 19:30:11.795668"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:30:11.761311"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 19:30:11.761311"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 19:30:11.795668"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:30:11.817888"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 19:30:11.834059"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 19:30:11.834059"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 19:30:11.841496"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 19:30:11.834059"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 19:30:11.834059"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 19:30:11.841496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:30:11.858988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:30:11.869814"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 19:30:11.869814"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 19:30:11.881019"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:30:11.869814"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 19:30:11.869814"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 19:30:11.881019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:30:11.901400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.2ms) Completed 200 OK in 22ms (Views: 17.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 8.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (240.4ms) DROP TABLE "billing_accounts"  (161.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.7ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.4ms) DROP TABLE "billing_modifiers"  (164.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (181.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (149.6ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) DROP TABLE "billing_origins"  (181.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (152.6ms) DROP TABLE "billing_payments"  (159.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (171.8ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (164.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (255.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (164.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (156.2ms) DROP TABLE "profiles"  (172.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations" Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.4ms) DROP TABLE "billing_accounts"  (168.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (188.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (163.6ms) DROP TABLE "billing_charges"  (165.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.5ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) DROP TABLE "billing_origins"  (205.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (206.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (181.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (146.1ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.7ms) DROP TABLE "billing_plus"  (476.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.5ms) DROP TABLE "billing_profiles"  (181.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (156.9ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations" Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.5ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (146.9ms) DROP TABLE "billing_charges"  (164.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.8ms) DROP TABLE "billing_operators"  (172.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.6ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (138.8ms) DROP TABLE "billing_payment_types"  (157.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (156.0ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 19:59:25', '2014-07-24 19:59:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 19:59:25', '2014-07-24 19:59:25', 980190962)  (190.6ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (15.1ms) Completed 200 OK in 43ms (Views: 31.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:59:25.688962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:59:25.702831"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 19:59:25.709404"], ["price_cents", 300], ["updated_at", "2014-07-24 19:59:25.709404"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 19:59:25.718340"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 19:59:25.709404"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 19:59:25.709404"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 19:59:25.718340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:59:25.738102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:59:25.747003"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 19:59:25.747003"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 19:59:25.757727"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:59:25.747003"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 19:59:25.747003"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 19:59:25.757727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:59:25.776631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 19:59:25.797886"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 19:59:25.797886"], ["value_cents", 400]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 19:59:25.805893"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 19:59:25.797886"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 19:59:25.797886"], ["value_cents", 400]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 19:59:25.805893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:59:25.823639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:59:25.832421"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 19:59:25.832421"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 19:59:25.843200"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 19:59:25.832421"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 19:59:25.832421"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 19:59:25.843200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 19:59:25.863308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.3ms) DROP TABLE "billing_accounts"  (145.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (172.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.2ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.4ms) DROP TABLE "billing_operators"  (156.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.4ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (174.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (171.9ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.3ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:00:09', '2014-07-24 20:00:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:00:09', '2014-07-24 20:00:09', 980190962)  (188.9ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.5ms) Completed 200 OK in 37ms (Views: 28.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:00:09.691102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:00:09.705763"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:00:09.712452"], ["price_cents", 300], ["updated_at", "2014-07-24 20:00:09.712452"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:00:09.721423"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:00:09.712452"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:00:09.712452"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:00:09.721423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:00:09.763678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:00:09.777788"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:00:09.777788"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:00:09.788218"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:00:09.777788"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:00:09.777788"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:00:09.788218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:00:09.807737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:00:09.821700"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:00:09.821700"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:00:09.830058"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:00:09.821700"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:00:09.821700"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:00:09.830058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:00:09.848468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:00:09.857473"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:00:09.857473"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:00:09.866637"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:00:09.857473"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:00:09.857473"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:00:09.866637"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:00:09.886578"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 8.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (238.6ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.5ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (157.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (263.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.2ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.0ms) DROP TABLE "billing_payment_types"  (322.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.4ms) DROP TABLE "billing_plus"  (172.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.2ms) DROP TABLE "billing_profiles"  (174.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (170.0ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.3ms) DROP TABLE "profiles"  (158.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:03:04', '2014-07-24 20:03:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:03:04', '2014-07-24 20:03:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:03:05', '2014-07-24 20:03:05', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:03:05', '2014-07-24 20:03:05', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:03:05', '2014-07-24 20:03:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:03:05', '2014-07-24 20:03:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:03:05', '2014-07-24 20:03:05', 980190962)  (187.2ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.6ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.1ms) Completed 200 OK in 49ms (Views: 33.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:03:05.480660"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:03:05.494457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:03:05.500834"], ["price_cents", 300], ["updated_at", "2014-07-24 20:03:05.500834"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:03:05.508900"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:03:05.500834"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:03:05.500834"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:03:05.508900"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:03:05.527698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:03:05.537085"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:03:05.537085"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:03:05.547298"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:03:05.537085"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:03:05.537085"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:03:05.547298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:03:05.566570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:03:05.581667"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:03:05.581667"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:03:05.589657"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:03:05.581667"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:03:05.581667"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:03:05.589657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:03:05.607490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:03:05.616259"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:03:05.616259"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:03:05.625251"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:03:05.616259"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:03:05.616259"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:03:05.625251"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:03:05.645330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (168.5ms) DROP TABLE "billing_accounts"  (160.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (173.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.3ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.0ms) DROP TABLE "billing_operators"  (181.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.8ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (130.3ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.4ms) DROP TABLE "billing_plus"  (172.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (484.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.3ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.8ms) DROP TABLE "billing_tax_groups"  (156.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:30', '2014-07-24 20:04:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:04:30', '2014-07-24 20:04:30', 980190962)  (198.8ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.2ms) Completed 200 OK in 26ms (Views: 21.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 24ms (Views: 20.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:31.370129"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:31.384070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:04:31.392090"], ["price_cents", 300], ["updated_at", "2014-07-24 20:04:31.392090"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:04:31.400701"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:04:31.392090"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:04:31.392090"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:04:31.400701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:31.419260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:31.428331"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:04:31.428331"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:04:31.438239"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:31.428331"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:04:31.428331"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:04:31.438239"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:31.459977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:04:31.474139"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:04:31.474139"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:04:31.481662"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:04:31.474139"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:04:31.474139"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:04:31.481662"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:31.501884"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:31.510971"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:04:31.510971"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:04:31.520471"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:31.510971"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:04:31.510971"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:04:31.520471"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:31.539841"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.9ms) DROP TABLE "billing_accounts"  (160.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (171.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.5ms) DROP TABLE "billing_charges"  (172.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (157.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (205.3ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_operators"  (172.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.7ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (165.4ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.1ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (163.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (164.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.7ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (158.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.2ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:04:55', '2014-07-24 20:04:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:04:55', '2014-07-24 20:04:55', 980190962)  (189.4ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.6ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (9.1ms) Completed 200 OK in 32ms (Views: 26.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:55.469513"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:55.508476"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:04:55.515055"], ["price_cents", 300], ["updated_at", "2014-07-24 20:04:55.515055"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:04:55.523367"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:04:55.515055"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:04:55.515055"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:04:55.523367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:55.541852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:55.550848"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:04:55.550848"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:04:55.562676"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:55.550848"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:04:55.550848"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:04:55.562676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:55.582649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:04:55.596876"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:04:55.596876"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:04:55.604262"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:04:55.596876"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:04:55.596876"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:04:55.604262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:55.623747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:55.633212"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:04:55.633212"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:04:55.642590"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:04:55.633212"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:04:55.633212"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:04:55.642590"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:04:55.662068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.1ms) DROP TABLE "billing_accounts"  (152.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.9ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.1ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (172.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.6ms) DROP TABLE "billing_operators"  (419.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (171.8ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (172.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (148.5ms) DROP TABLE "billing_payments"  (181.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (155.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:21', '2014-07-24 20:05:21', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:05:21', '2014-07-24 20:05:21', 980190962)  (267.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.4ms) Completed 200 OK in 47ms (Views: 32.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.486440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.502917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:05:21.509772"], ["price_cents", 300], ["updated_at", "2014-07-24 20:05:21.509772"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:05:21.518883"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:05:21.509772"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:05:21.509772"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:05:21.518883"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.563027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:21.576955"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:05:21.576955"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:05:21.587129"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:21.576955"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:05:21.576955"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:05:21.587129"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.607798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:05:21.622595"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:05:21.622595"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:05:21.630245"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:05:21.622595"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:05:21.622595"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:05:21.630245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.648369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:21.658512"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:05:21.658512"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:05:21.668216"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:21.658512"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:05:21.658512"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:05:21.668216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.687572"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "type", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:05:21.724286"], ["type", "Billing::Payment"], ["updated_at", "2014-07-24 20:05:21.724286"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:21.729064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (190.4ms) DROP TABLE "billing_accounts"  (154.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (163.4ms) DROP TABLE "billing_charges"  (165.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_departments"  (172.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (174.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.1ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (164.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.2ms) DROP TABLE "billing_origins"  (181.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (165.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (148.4ms) DROP TABLE "billing_payment_types"  (164.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.8ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (149.0ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.3ms) DROP TABLE "billing_profiles"  (156.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.2ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.1ms) DROP TABLE "profiles"  (165.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:05:42', '2014-07-24 20:05:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:05:42', '2014-07-24 20:05:42', 980190962)  (195.4ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.6ms) Completed 200 OK in 26ms (Views: 21.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "type", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:05:42.624754"], ["type", "Billing::Payment"], ["updated_at", "2014-07-24 20:05:42.624754"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.630836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.666354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.681391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:05:42.688013"], ["price_cents", 300], ["updated_at", "2014-07-24 20:05:42.688013"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:05:42.696712"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:05:42.688013"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:05:42.688013"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:05:42.696712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.715831"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:42.725475"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:05:42.725475"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:05:42.736174"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:42.725475"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:05:42.725475"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:05:42.736174"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.756687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:05:42.772085"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:05:42.772085"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:05:42.780241"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:05:42.772085"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:05:42.772085"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:05:42.780241"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.798891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:42.807772"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:05:42.807772"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:05:42.816943"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:05:42.807772"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:05:42.807772"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:05:42.816943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:05:42.836463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 13ms (Views: 10.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.0ms) DROP TABLE "billing_accounts"  (158.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (164.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (147.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.5ms) DROP TABLE "billing_charges"  (156.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.5ms) DROP TABLE "billing_departments"  (172.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (165.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.2ms) DROP TABLE "billing_operators"  (164.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.4ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (156.6ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.8ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.8ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:07:03', '2014-07-24 20:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:07:03', '2014-07-24 20:07:03', 980190962)  (188.8ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:03.682622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:03.701102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:07:03.708842"], ["price_cents", 300], ["updated_at", "2014-07-24 20:07:03.708842"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:07:03.718654"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:07:03.708842"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:07:03.708842"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:07:03.718654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:03.740149"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:07:03.755131"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:07:03.755131"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:07:03.765915"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:07:03.755131"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:07:03.755131"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:07:03.765915"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:03.809536"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:07:03.825095"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:07:03.825095"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:07:03.832405"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:07:03.825095"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:07:03.825095"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:07:03.832405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:03.850367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:07:03.859087"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:07:03.859087"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:07:03.868119"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:07:03.859087"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:07:03.859087"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:07:03.868119"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:03.887002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.3ms) Completed 200 OK in 22ms (Views: 18.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 8.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "type", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:07:04.005313"], ["type", "Billing::Payment"], ["updated_at", "2014-07-24 20:07:04.005313"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:07:04.010155"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (186.1ms) DROP TABLE "billing_accounts"  (160.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.4ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.4ms) DROP TABLE "billing_departments"  (182.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.1ms) DROP TABLE "billing_origins"  (164.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (189.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.6ms) DROP TABLE "billing_payments"  (183.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (165.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.4ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (156.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.9ms) DROP TABLE "profiles"  (157.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:09:01', '2014-07-24 20:09:01', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:09:01', '2014-07-24 20:09:01', 980190962)  (188.8ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.2ms) Completed 200 OK in 52ms (Views: 34.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 24ms (Views: 20.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.584260"]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:09:01.610932"], ["type", "Billing::Payment"], ["updated_at", "2014-07-24 20:09:01.610932"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.584260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.705650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.720288"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:09:01.726582"], ["price_cents", 300], ["updated_at", "2014-07-24 20:09:01.726582"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:09:01.735015"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:09:01.726582"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:09:01.726582"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:09:01.735015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.753771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:09:01.764426"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:09:01.764426"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:09:01.775375"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:09:01.764426"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:09:01.764426"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:09:01.775375"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.794898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:09:01.809463"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:09:01.809463"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:09:01.818806"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:09:01.809463"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:09:01.809463"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:09:01.818806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.837438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:09:01.847016"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:09:01.847016"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:09:01.856410"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:09:01.847016"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:09:01.847016"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:09:01.856410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:09:01.878217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (229.3ms) DROP TABLE "billing_accounts"  (157.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (164.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (228.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.8ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (360.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.3ms) DROP TABLE "billing_departments"  (189.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (189.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.9ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (166.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.2ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (189.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (286.9ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.7ms) DROP TABLE "billing_profiles"  (157.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.1ms) DROP TABLE "profiles"  (172.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.2ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.2ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:19:33', '2014-07-24 20:19:33', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:19:33', '2014-07-24 20:19:33', 980190962)  (193.4ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.3ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:19:33.771071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:19:33.785977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:19:33.792879"], ["price_cents", 300], ["updated_at", "2014-07-24 20:19:33.792879"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:19:33.801249"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:19:33.792879"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:19:33.792879"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:19:33.801249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:19:33.820825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:19:33.834456"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:19:33.834456"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:19:33.869201"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:19:33.834456"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:19:33.834456"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:19:33.869201"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:19:33.890578"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:19:33.906846"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:19:33.906846"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:19:33.914522"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:19:33.906846"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:19:33.906846"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:19:33.914522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:19:33.933972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:19:33.943462"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:19:33.943462"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:19:33.953015"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:19:33.943462"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:19:33.943462"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:19:33.953015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:19:33.973447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.9ms) Completed 200 OK in 22ms (Views: 18.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 8.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.2ms) DROP TABLE "billing_accounts"  (151.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (156.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (172.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (180.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (237.8ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.9ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) DROP TABLE "billing_origins"  (182.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.7ms) DROP TABLE "billing_payments"  (164.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (155.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (138.9ms) DROP TABLE "billing_profiles"  (246.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (166.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (148.0ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:20:42', '2014-07-24 20:20:42', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:20:42', '2014-07-24 20:20:42', 980190962)  (189.1ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.6ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.3ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (10.5ms) Completed 200 OK in 34ms (Views: 27.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:20:43.041856"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:20:43.055743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:20:43.062156"], ["price_cents", 300], ["updated_at", "2014-07-24 20:20:43.062156"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:20:43.070557"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:20:43.062156"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:20:43.062156"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:20:43.070557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:20:43.088605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:20:43.097870"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:20:43.097870"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:20:43.108054"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:20:43.097870"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:20:43.097870"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:20:43.108054"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:20:43.126934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:20:43.141531"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:20:43.141531"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:20:43.149373"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:20:43.141531"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:20:43.141531"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:20:43.149373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:20:43.167657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:20:43.176326"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:20:43.176326"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:20:43.185349"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:20:43.176326"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:20:43.176326"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:20:43.185349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:20:43.205720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.7ms) DROP TABLE "billing_accounts"  (161.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (254.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (164.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (172.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (182.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.2ms) DROP TABLE "billing_payment_types"  (164.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (163.7ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (181.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:12', '2014-07-24 20:22:12', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:22:12', '2014-07-24 20:22:12', 980190962)  (201.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:12.678324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:12.698343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:22:12.706601"], ["price_cents", 300], ["updated_at", "2014-07-24 20:22:12.706601"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:22:12.717181"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:22:12.706601"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:22:12.706601"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:22:12.717181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:12.740777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:12.755512"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:22:12.755512"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:22:12.766619"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:12.755512"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:22:12.755512"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:22:12.766619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:12.813681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:22:12.830605"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:22:12.830605"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:22:12.839597"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:22:12.830605"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:22:12.830605"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:22:12.839597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:12.857972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:12.867097"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:22:12.867097"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:22:12.876394"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:12.867097"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:22:12.867097"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:22:12.876394"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:12.896803"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.3ms) Completed 200 OK in 29ms (Views: 23.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.1ms) DROP TABLE "billing_accounts"  (160.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.0ms) DROP TABLE "billing_charges"  (172.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.9ms) DROP TABLE "billing_operators"  (164.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (189.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.3ms) DROP TABLE "billing_payment_types"  (312.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (165.3ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.7ms) DROP TABLE "billing_plus"  (164.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (212.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.6ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (238.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:22:24', '2014-07-24 20:22:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:22:24', '2014-07-24 20:22:24', 980190962)  (204.6ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (9.6ms) Completed 200 OK in 34ms (Views: 27.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 15ms (Views: 13.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:25.329865"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:25.343829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:22:25.350157"], ["price_cents", 300], ["updated_at", "2014-07-24 20:22:25.350157"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:22:25.358346"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:22:25.350157"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:22:25.350157"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:22:25.358346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:25.377188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:25.387075"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:22:25.387075"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:22:25.397183"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:25.387075"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:22:25.387075"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:22:25.397183"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:25.416350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:22:25.431871"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:22:25.431871"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:22:25.439340"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:22:25.431871"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:22:25.431871"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:22:25.439340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:25.456968"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:25.465937"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:22:25.465937"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:22:25.476068"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:22:25.465937"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:22:25.465937"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:22:25.476068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:22:25.496358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.2ms) DROP TABLE "billing_accounts"  (160.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (188.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.3ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (189.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (165.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.6ms) DROP TABLE "billing_modifiers"  (181.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.1ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.6ms) DROP TABLE "billing_payments"  (164.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.4ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.3ms) DROP TABLE "billing_profiles"  (173.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:19', '2014-07-24 20:24:19', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:24:19', '2014-07-24 20:24:19', 980190962)  (180.7ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:19.743626"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:19.758585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:24:19.765574"], ["price_cents", 300], ["updated_at", "2014-07-24 20:24:19.765574"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:24:19.778375"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:24:19.765574"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:24:19.765574"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:24:19.778375"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:19.796657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:19.810928"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:24:19.810928"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:24:19.821434"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:19.810928"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:24:19.810928"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:24:19.821434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:19.849040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:24:19.870958"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:24:19.870958"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:24:19.878846"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:24:19.870958"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:24:19.870958"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:24:19.878846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:19.896855"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:19.905640"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:24:19.905640"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:24:19.914747"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:19.905640"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:24:19.905640"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:24:19.914747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:19.935321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.4ms) Completed 200 OK in 23ms (Views: 18.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.4ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.7ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (320.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (165.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.4ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.9ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.5ms) DROP TABLE "billing_plus"  (180.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (182.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.2ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.4ms) DROP TABLE "billing_tax_groups"  (157.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.4ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:24:52', '2014-07-24 20:24:52', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:24:52', '2014-07-24 20:24:52', 980190962)  (204.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:52.964328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:52.983999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:24:52.992151"], ["price_cents", 300], ["updated_at", "2014-07-24 20:24:52.992151"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:24:53.003889"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:24:52.992151"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:24:52.992151"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:24:53.003889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:53.026077"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:53.040429"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:24:53.040429"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:24:53.052352"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:53.040429"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:24:53.040429"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:24:53.052352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:53.080858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:24:53.096804"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:24:53.096804"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:24:53.105580"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:24:53.096804"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:24:53.096804"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:24:53.105580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:53.123626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:53.132624"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:24:53.132624"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:24:53.141535"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:24:53.132624"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:24:53.132624"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:24:53.141535"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:24:53.161945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.6ms) Completed 200 OK in 29ms (Views: 24.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 32ms (Views: 30.1ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.8ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.3ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (188.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.2ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (173.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (157.2ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (172.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.8ms) DROP TABLE "billing_origins"  (181.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.5ms) DROP TABLE "billing_payment_types"  (255.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.1ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (165.1ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (138.9ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.4ms) DROP TABLE "billing_tax_groups"  (181.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.1ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:25:44', '2014-07-24 20:25:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:25:44', '2014-07-24 20:25:44', 980190962)  (188.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:25:44.749294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:25:44.771529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:25:44.779851"], ["price_cents", 300], ["updated_at", "2014-07-24 20:25:44.779851"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:25:44.790407"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:25:44.779851"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:25:44.779851"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:25:44.790407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:25:44.812645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:25:44.828631"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:25:44.828631"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:25:44.840226"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:25:44.828631"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:25:44.828631"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:25:44.840226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:25:44.868709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:25:44.886346"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:25:44.886346"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:25:44.894301"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:25:44.886346"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:25:44.886346"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:25:44.894301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:25:44.912620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:25:44.921727"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:25:44.921727"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:25:44.932837"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:25:44.921727"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:25:44.921727"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:25:44.932837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:25:44.952604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.6ms) Completed 200 OK in 22ms (Views: 18.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.7ms) DROP TABLE "billing_accounts"  (159.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (164.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (156.3ms) DROP TABLE "billing_charges"  (164.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.6ms) DROP TABLE "billing_departments"  (156.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (173.1ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_operators"  (189.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.3ms) DROP TABLE "billing_plus"  (165.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.8ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.7ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (163.9ms) DROP TABLE "profiles"  (172.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:26:50', '2014-07-24 20:26:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:26:50', '2014-07-24 20:26:50', 980190962)  (186.7ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 55ms (Views: 41.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:26:50.499770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:26:50.537931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:26:50.544122"], ["price_cents", 300], ["updated_at", "2014-07-24 20:26:50.544122"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:26:50.552342"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:26:50.544122"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:26:50.544122"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:26:50.552342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:26:50.571894"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:26:50.584904"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:26:50.584904"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:26:50.595037"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:26:50.584904"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:26:50.584904"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:26:50.595037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:26:50.615978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:26:50.630366"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:26:50.630366"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:26:50.637791"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:26:50.630366"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:26:50.630366"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:26:50.637791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:26:50.655611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:26:50.666282"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:26:50.666282"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:26:50.675925"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:26:50.666282"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:26:50.666282"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:26:50.675925"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:26:50.695218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (189.8ms) DROP TABLE "billing_accounts"  (148.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.9ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (181.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (179.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (180.4ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (271.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.5ms) DROP TABLE "billing_operators"  (164.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.2ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (189.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.5ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (180.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (156.0ms) DROP TABLE "profiles"  (173.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:28:06', '2014-07-24 20:28:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:28:06', '2014-07-24 20:28:06', 980190962)  (189.4ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (18.9ms) Completed 200 OK in 53ms (Views: 39.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:28:06.525926"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:28:06.540083"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:28:06.546532"], ["price_cents", 300], ["updated_at", "2014-07-24 20:28:06.546532"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:28:06.554909"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:28:06.546532"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:28:06.546532"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:28:06.554909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:28:06.576671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:28:06.590010"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:28:06.590010"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:28:06.600160"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:28:06.590010"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:28:06.590010"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:28:06.600160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:28:06.623315"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:28:06.632928"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:28:06.632928"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:28:06.640387"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:28:06.632928"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:28:06.632928"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:28:06.640387"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:28:06.657802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:28:06.666701"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:28:06.666701"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:28:06.677967"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:28:06.666701"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:28:06.666701"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:28:06.677967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:28:06.697402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (195.3ms) DROP TABLE "billing_accounts"  (161.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (196.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (173.5ms) DROP TABLE "billing_departments"  (164.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.8ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (264.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.3ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.3ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (180.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (180.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (182.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (131.0ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:31:55', '2014-07-24 20:31:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:31:55', '2014-07-24 20:31:55', 980190962)  (192.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.8ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.4ms) Completed 200 OK in 54ms (Views: 36.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 6.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:31:56.465182"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:31:56.478852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:31:56.485100"], ["price_cents", 300], ["updated_at", "2014-07-24 20:31:56.485100"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:31:56.493402"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:31:56.485100"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:31:56.485100"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:31:56.493402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:31:56.514592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:31:56.523794"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:31:56.523794"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:31:56.534066"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:31:56.523794"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:31:56.523794"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:31:56.534066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:31:56.553235"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:31:56.562182"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:31:56.562182"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:31:56.573975"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:31:56.562182"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:31:56.562182"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:31:56.573975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:31:56.592170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:31:56.601392"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:31:56.601392"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:31:56.610737"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:31:56.601392"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:31:56.601392"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:31:56.610737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:31:56.634834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.1ms) DROP TABLE "billing_accounts"  (160.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (165.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (172.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.6ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (166.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.2ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.6ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (157.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (163.8ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:38:23', '2014-07-24 20:38:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:38:23', '2014-07-24 20:38:23', 980190962)  (186.3ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.1ms) Completed 200 OK in 53ms (Views: 39.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 8.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:38:24.235312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:38:24.249381"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:38:24.255810"], ["price_cents", 300], ["updated_at", "2014-07-24 20:38:24.255810"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:38:24.263743"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:38:24.255810"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:38:24.255810"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:38:24.263743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:38:24.281183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:38:24.290541"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:38:24.290541"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:38:24.300729"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:38:24.290541"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:38:24.290541"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:38:24.300729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:38:24.319766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:38:24.333815"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:38:24.333815"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:38:24.341576"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:38:24.333815"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:38:24.333815"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:38:24.341576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:38:24.359708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:38:24.368585"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:38:24.368585"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:38:24.377804"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:38:24.368585"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:38:24.368585"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:38:24.377804"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:38:24.397160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.7ms) DROP TABLE "billing_accounts"  (175.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (196.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (342.5ms) DROP TABLE "billing_charges"  (166.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_departments"  (173.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (165.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.2ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (172.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (255.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (164.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.3ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (171.8ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:04', '2014-07-24 20:47:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:47:04', '2014-07-24 20:47:04', 980190962)  (196.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:04.488790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:04.508327"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:47:04.517271"], ["price_cents", 300], ["updated_at", "2014-07-24 20:47:04.517271"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:47:04.529278"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:47:04.517271"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:47:04.517271"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:47:04.529278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:04.551517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:04.565646"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:47:04.565646"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:47:04.576453"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:04.565646"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:47:04.565646"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:47:04.576453"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:04.606384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:47:04.624363"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:47:04.624363"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:47:04.632123"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:47:04.624363"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:47:04.624363"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:47:04.632123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:04.651799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:04.660900"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:47:04.660900"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:47:04.670045"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:04.660900"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:47:04.660900"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:47:04.670045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:04.691609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.9ms) Completed 200 OK in 24ms (Views: 20.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 8.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (259.2ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (156.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.5ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.5ms) DROP TABLE "billing_modifiers"  (164.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (165.0ms) DROP TABLE "billing_origins"  (181.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (279.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (130.7ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.5ms) DROP TABLE "billing_plus"  (164.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.8ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.8ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:47:36', '2014-07-24 20:47:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:47:36', '2014-07-24 20:47:36', 980190962)  (180.1ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (15.1ms) Completed 200 OK in 42ms (Views: 31.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 17ms (Views: 6.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:37.148786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:37.162201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:47:37.168417"], ["price_cents", 300], ["updated_at", "2014-07-24 20:47:37.168417"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:47:37.176440"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:47:37.168417"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:47:37.168417"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:47:37.176440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:37.195281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:37.204423"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:47:37.204423"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:47:37.214202"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:37.204423"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:47:37.204423"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:47:37.214202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:37.233727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:47:37.248662"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:47:37.248662"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:47:37.256314"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:47:37.248662"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:47:37.248662"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:47:37.256314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:37.273910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:37.283029"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:47:37.283029"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:47:37.293094"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:47:37.283029"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:47:37.283029"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:47:37.293094"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:47:37.312543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (198.3ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.3ms) DROP TABLE "billing_charges"  (157.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.4ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.7ms) DROP TABLE "billing_operators"  (189.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.8ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (173.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.0ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:48:39', '2014-07-24 20:48:39', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:48:39', '2014-07-24 20:48:39', 980190962)  (189.4ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.1ms) Completed 200 OK in 54ms (Views: 40.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:48:40.126789"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:48:40.140492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:48:40.147505"], ["price_cents", 300], ["updated_at", "2014-07-24 20:48:40.147505"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:48:40.156085"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:48:40.147505"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:48:40.147505"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:48:40.156085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:48:40.174220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:48:40.183373"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:48:40.183373"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:48:40.193182"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:48:40.183373"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:48:40.183373"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:48:40.193182"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:48:40.212486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:48:40.221167"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:48:40.221167"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:48:40.228709"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:48:40.221167"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:48:40.221167"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:48:40.228709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:48:40.245995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:48:40.255161"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:48:40.255161"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:48:40.264751"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:48:40.255161"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:48:40.255161"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:48:40.264751"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:48:40.283819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (203.9ms) DROP TABLE "billing_accounts"  (175.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (180.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.0ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_departments"  (172.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (165.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.5ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (180.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (171.7ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (180.2ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.1ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.3ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.6ms) DROP TABLE "billing_profiles"  (156.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:49:06', '2014-07-24 20:49:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:49:06', '2014-07-24 20:49:06', 980190962)  (186.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:49:06.981634"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:49:07.001783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:49:07.009658"], ["price_cents", 300], ["updated_at", "2014-07-24 20:49:07.009658"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:49:07.019566"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:49:07.009658"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:49:07.009658"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:49:07.019566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:49:07.040386"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:49:07.055719"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:49:07.055719"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:49:07.066869"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:49:07.055719"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:49:07.055719"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:49:07.066869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:49:07.095180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:49:07.112175"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:49:07.112175"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:49:07.120120"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:49:07.112175"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:49:07.112175"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:49:07.120120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:49:07.138230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:49:07.147017"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:49:07.147017"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:49:07.155940"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:49:07.147017"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:49:07.147017"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:49:07.155940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:49:07.176950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.3ms) Completed 200 OK in 29ms (Views: 23.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 32ms (Views: 29.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.6ms) DROP TABLE "billing_accounts"  (159.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (171.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (345.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (164.7ms) DROP TABLE "billing_departments"  (174.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.9ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.6ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (138.6ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.6ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (165.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.6ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:50:55', '2014-07-24 20:50:55', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:50:55', '2014-07-24 20:50:55', 980190962)  (187.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.2ms) Completed 200 OK in 53ms (Views: 35.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 15ms (Views: 11.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:50:55.525453"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:50:55.538859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:50:55.545067"], ["price_cents", 300], ["updated_at", "2014-07-24 20:50:55.545067"]] SQL (26.9ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:50:55.553015"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:50:55.545067"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:50:55.545067"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:50:55.553015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:50:55.605460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:50:55.617399"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:50:55.617399"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:50:55.629800"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:50:55.617399"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:50:55.617399"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:50:55.629800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:50:55.651239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:50:55.660228"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:50:55.660228"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:50:55.667843"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:50:55.660228"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:50:55.660228"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:50:55.667843"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:50:55.686320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:50:55.695471"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:50:55.695471"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:50:55.705057"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:50:55.695471"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:50:55.695471"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:50:55.705057"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:50:55.724300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.2ms) DROP TABLE "billing_accounts"  (160.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.7ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.1ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (188.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (174.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.2ms) DROP TABLE "billing_origins"  (156.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.0ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.4ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (246.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (138.8ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (156.8ms) DROP TABLE "billing_tax_groups"  (156.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.9ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:51:12', '2014-07-24 20:51:12', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:51:12', '2014-07-24 20:51:12', 980190962)  (195.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.1ms) Completed 200 OK in 64ms (Views: 50.0ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:51:13.118021"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:51:13.132408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:51:13.138585"], ["price_cents", 300], ["updated_at", "2014-07-24 20:51:13.138585"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:51:13.146743"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:51:13.138585"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:51:13.138585"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:51:13.146743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:51:13.164875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:51:13.173852"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:51:13.173852"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:51:13.184479"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:51:13.173852"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:51:13.173852"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:51:13.184479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:51:13.204089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:51:13.218318"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:51:13.218318"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:51:13.225611"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:51:13.218318"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:51:13.218318"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:51:13.225611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:51:13.243598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:51:13.252810"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:51:13.252810"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:51:13.261902"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:51:13.252810"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:51:13.252810"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:51:13.261902"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:51:13.280584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (190.9ms) DROP TABLE "billing_accounts"  (159.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.4ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (164.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (188.6ms) DROP TABLE "billing_modifiers"  (165.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (180.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.9ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (146.9ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.5ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (189.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.4ms) DROP TABLE "billing_plus"  (155.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (182.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.2ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.3ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:52:49', '2014-07-24 20:52:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:52:49', '2014-07-24 20:52:49', 980190962)  (180.5ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.2ms) Completed 200 OK in 25ms (Views: 20.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 36ms (Views: 33.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:52:50.046623"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:52:50.060236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:52:50.066403"], ["price_cents", 300], ["updated_at", "2014-07-24 20:52:50.066403"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:52:50.074572"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:52:50.066403"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:52:50.066403"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:52:50.074572"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:52:50.092322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:52:50.101561"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:52:50.101561"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:52:50.111614"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:52:50.101561"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:52:50.101561"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:52:50.111614"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:52:50.130778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:52:50.144736"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:52:50.144736"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:52:50.152592"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:52:50.144736"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:52:50.144736"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:52:50.152592"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:52:50.170497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:52:50.179254"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:52:50.179254"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:52:50.188165"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:52:50.179254"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:52:50.179254"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:52:50.188165"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:52:50.207651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.1ms) DROP TABLE "billing_accounts"  (150.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (155.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.7ms) DROP TABLE "billing_charges"  (156.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (181.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (165.0ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (485.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (173.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (148.5ms) DROP TABLE "billing_profiles"  (199.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.4ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:54:42', '2014-07-24 20:54:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:54:42', '2014-07-24 20:54:42', 980190962)  (186.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.6ms) Completed 200 OK in 50ms (Views: 36.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:54:42.583862"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:54:42.599538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:54:42.605846"], ["price_cents", 300], ["updated_at", "2014-07-24 20:54:42.605846"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:54:42.613944"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:54:42.605846"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:54:42.605846"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:54:42.613944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:54:42.634132"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:54:42.643549"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:54:42.643549"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:54:42.653656"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:54:42.643549"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:54:42.643549"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:54:42.653656"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:54:42.674341"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:54:42.682325"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:54:42.682325"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:54:42.690463"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:54:42.682325"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:54:42.682325"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:54:42.690463"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:54:42.710169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:54:42.718760"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:54:42.718760"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:54:42.727764"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:54:42.718760"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:54:42.718760"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:54:42.727764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:54:42.749797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 10.4ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (273.2ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (180.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.9ms) DROP TABLE "billing_departments"  (156.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (174.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.1ms) DROP TABLE "billing_origins"  (197.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (163.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (163.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (212.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (436.4ms) DROP TABLE "billing_profiles"  (352.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.2ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:55:07', '2014-07-24 20:55:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:55:07', '2014-07-24 20:55:07', 980190962)  (191.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:07.798416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:07.818590"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:55:07.826624"], ["price_cents", 300], ["updated_at", "2014-07-24 20:55:07.826624"]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:55:07.837508"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:55:07.826624"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:55:07.826624"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:55:07.837508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:07.859987"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:55:07.874445"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:55:07.874445"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:55:07.885560"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:55:07.874445"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:55:07.874445"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:55:07.885560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:07.913706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:55:07.923558"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:55:07.923558"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:55:07.930880"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:55:07.923558"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:55:07.923558"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:55:07.930880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:07.949820"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:55:07.958832"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:55:07.958832"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:55:07.967873"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:55:07.958832"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:55:07.958832"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:55:07.967873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:07.987577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.4ms) Completed 200 OK in 28ms (Views: 23.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:55:08.111781"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:55:08.111781"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:55:08.116519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.8ms) DROP TABLE "billing_accounts"  (154.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (165.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (164.9ms) DROP TABLE "billing_departments"  (164.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.7ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (172.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.7ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.9ms) DROP TABLE "billing_payment_types"  (166.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.1ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (287.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (155.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.2ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:56:34', '2014-07-24 20:56:34', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:56:34', '2014-07-24 20:56:34', 980190962)  (193.3ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.5ms) Completed 200 OK in 53ms (Views: 35.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:56:34.649360"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:56:34.649360"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.654657"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.693781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.711294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:56:34.717598"], ["price_cents", 300], ["updated_at", "2014-07-24 20:56:34.717598"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:56:34.725942"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:56:34.717598"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:56:34.717598"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:56:34.725942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.745143"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:56:34.754207"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:56:34.754207"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:56:34.765965"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:56:34.754207"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:56:34.754207"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:56:34.765965"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.786541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:56:34.794393"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:56:34.794393"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:56:34.801477"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:56:34.794393"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:56:34.794393"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:56:34.801477"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.821353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:56:34.830656"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:56:34.830656"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:56:34.839944"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:56:34.830656"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:56:34.830656"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:56:34.839944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:56:34.860475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (247.2ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.8ms) DROP TABLE "billing_charges"  (173.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (172.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (188.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (173.5ms) DROP TABLE "billing_modifiers"  (165.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (163.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.8ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_origins"  (197.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (173.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (164.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.9ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (180.0ms) DROP TABLE "billing_tax_groups"  (180.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (272.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:57:48', '2014-07-24 20:57:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:57:48', '2014-07-24 20:57:48', 980190962)  (190.8ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.9ms) Completed 200 OK in 54ms (Views: 39.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:57:49.201082"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:57:49.216964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:57:49.223686"], ["price_cents", 300], ["updated_at", "2014-07-24 20:57:49.223686"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:57:49.232216"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:57:49.223686"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:57:49.223686"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:57:49.232216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:57:49.251550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:57:49.264964"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:57:49.264964"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:57:49.275576"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:57:49.264964"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:57:49.264964"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:57:49.275576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:57:49.295954"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:57:49.303654"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:57:49.303654"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:57:49.311456"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:57:49.303654"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:57:49.303654"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:57:49.311456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:57:49.330228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:57:49.339293"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:57:49.339293"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:57:49.348277"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:57:49.339293"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:57:49.339293"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:57:49.348277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:57:49.368276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.5ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (187.1ms) DROP TABLE "billing_accounts"  (151.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.6ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (187.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.2ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (182.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.7ms) DROP TABLE "billing_operators"  (156.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (229.4ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (189.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (157.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.7ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (163.8ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:13', '2014-07-24 20:58:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:58:13', '2014-07-24 20:58:13', 980190962)  (366.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.9ms) Completed 200 OK in 51ms (Views: 34.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:13.822529"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:13.836950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:58:13.843093"], ["price_cents", 300], ["updated_at", "2014-07-24 20:58:13.843093"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:58:13.851207"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:58:13.843093"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:58:13.843093"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:58:13.851207"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:13.872283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:13.881540"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:58:13.881540"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:58:13.891548"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:13.881540"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:58:13.881540"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:58:13.891548"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:13.913613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:58:13.921531"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:58:13.921531"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:58:13.929261"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:58:13.921531"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:58:13.921531"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:58:13.929261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:13.948325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:13.957330"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:58:13.957330"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:58:13.968309"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:13.957330"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:58:13.957330"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:58:13.968309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:13.989641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.4ms) DROP TABLE "billing_accounts"  (150.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (165.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (262.8ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (179.7ms) DROP TABLE "billing_departments"  (189.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (499.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (223.6ms) DROP TABLE "billing_modifiers"  (271.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.3ms) DROP TABLE "billing_operators"  (156.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (141.1ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (156.1ms) DROP TABLE "billing_payment_types"  (198.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.3ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.7ms) DROP TABLE "billing_profiles"  (174.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:58:37', '2014-07-24 20:58:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:58:37', '2014-07-24 20:58:37', 980190962)  (209.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (10.8ms) Completed 200 OK in 46ms (Views: 31.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:37.770203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:37.786177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:58:37.792848"], ["price_cents", 300], ["updated_at", "2014-07-24 20:58:37.792848"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:58:37.825137"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:58:37.792848"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:58:37.792848"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:58:37.825137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:37.844424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:37.858025"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:58:37.858025"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:58:37.868316"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:37.858025"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:58:37.858025"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:58:37.868316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:37.889651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:58:37.898165"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:58:37.898165"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:58:37.906354"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:58:37.898165"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:58:37.898165"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:58:37.906354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:37.926354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:37.935767"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:58:37.935767"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:58:37.945263"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:58:37.935767"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:58:37.935767"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:58:37.945263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:58:37.966630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (198.4ms) DROP TABLE "billing_accounts"  (159.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (156.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.9ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.5ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.0ms) DROP TABLE "billing_origins"  (182.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (312.1ms) DROP TABLE "billing_payments"  (205.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.5ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (186.7ms) DROP TABLE "billing_tax_groups"  (184.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 20:59:30', '2014-07-24 20:59:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 20:59:30', '2014-07-24 20:59:30', 980190962)  (194.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.163933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.184274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:59:31.192238"], ["price_cents", 300], ["updated_at", "2014-07-24 20:59:31.192238"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:59:31.202632"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:59:31.192238"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 20:59:31.192238"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 20:59:31.202632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.225511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:59:31.240270"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 20:59:31.240270"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:59:31.251095"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:59:31.240270"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 20:59:31.240270"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 20:59:31.251095"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.280190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:59:31.290300"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:59:31.290300"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:59:31.298051"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 20:59:31.290300"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:59:31.290300"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 20:59:31.298051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.316252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:59:31.324898"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 20:59:31.324898"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:59:31.334723"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 20:59:31.324898"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 20:59:31.324898"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 20:59:31.334723"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.354897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.4ms) Completed 200 OK in 29ms (Views: 23.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 20:59:31.543500"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 20:59:31.543500"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 20:59:31.548321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.1ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.1ms) select sqlite_version(*)  (164.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.7ms) DROP TABLE "billing_charges"  (502.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (156.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_operators"  (172.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.8ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (132.1ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.3ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (156.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.3ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:13', '2014-07-24 21:00:13', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:00:13', '2014-07-24 21:00:13', 980190962)  (180.2ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (18.3ms) Completed 200 OK in 52ms (Views: 38.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:13.921199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:13.937485"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:00:13.946043"], ["price_cents", 300], ["updated_at", "2014-07-24 21:00:13.946043"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:00:13.955226"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:00:13.946043"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:00:13.946043"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:00:13.955226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:14.002076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:14.015858"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:00:14.015858"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:00:14.025665"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:14.015858"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:00:14.015858"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:00:14.025665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:14.045679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:00:14.055404"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:00:14.055404"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:00:14.062829"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:00:14.055404"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:00:14.055404"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:00:14.062829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:14.081601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:14.090755"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:00:14.090755"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:00:14.099815"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:14.090755"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:00:14.090755"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:00:14.099815"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:14.122062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:00:14.231639"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:00:14.231639"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:14.236391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.9ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (174.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.3ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (148.0ms) DROP TABLE "billing_payment_types"  (164.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.4ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.5ms) DROP TABLE "billing_plus"  (180.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (164.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.4ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:00:50', '2014-07-24 21:00:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:00:50', '2014-07-24 21:00:50', 980190962)  (197.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (9.5ms) Completed 200 OK in 32ms (Views: 26.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.170133"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.184371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:00:51.190407"], ["price_cents", 300], ["updated_at", "2014-07-24 21:00:51.190407"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:00:51.198262"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:00:51.190407"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:00:51.190407"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:00:51.198262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.217928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:51.227051"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:00:51.227051"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:00:51.237414"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:51.227051"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:00:51.227051"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:00:51.237414"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.257347"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:00:51.265932"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:00:51.265932"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:00:51.273415"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:00:51.265932"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:00:51.265932"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:00:51.273415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.292144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:51.300845"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:00:51.300845"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:00:51.309718"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:00:51.300845"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:00:51.300845"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:00:51.309718"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.330715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:00:51.393448"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:00:51.393448"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:00:51.397979"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (166.9ms) DROP TABLE "billing_accounts"  (159.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.1ms) select sqlite_version(*)  (164.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (148.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (163.7ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (189.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (188.4ms) DROP TABLE "billing_modifiers"  (180.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.6ms) DROP TABLE "billing_operators"  (165.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.1ms) DROP TABLE "billing_origins"  (183.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (165.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (171.6ms) DROP TABLE "billing_payments"  (189.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.6ms) DROP TABLE "billing_plus"  (164.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.5ms) DROP TABLE "billing_profiles"  (156.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.1ms) DROP TABLE "billing_tax_groups"  (166.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.1ms) DROP TABLE "profiles"  (173.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:25', '2014-07-24 21:02:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:02:25', '2014-07-24 21:02:25', 980190962)  (232.5ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (11.2ms) Completed 200 OK in 34ms (Views: 27.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:02:25.794307"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:02:25.794307"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:25.802079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:25.874135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:25.891166"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:02:25.897525"], ["price_cents", 300], ["updated_at", "2014-07-24 21:02:25.897525"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:02:25.905552"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:02:25.897525"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:02:25.897525"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:02:25.905552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:25.924970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:25.934558"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:02:25.934558"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:02:25.947186"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:25.934558"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:02:25.934558"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:02:25.947186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:25.967705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:02:25.976423"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:02:25.976423"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:02:25.983867"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:02:25.976423"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:02:25.976423"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:02:25.983867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:26.008141"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:26.023271"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:02:26.023271"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:02:26.037153"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:26.023271"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:02:26.023271"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:02:26.037153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:26.058489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (194.3ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (151.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.8ms) DROP TABLE "billing_charges"  (189.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (165.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_departments"  (189.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.7ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.5ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (138.7ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.6ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.2ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.9ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.9ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:02:50', '2014-07-24 21:02:50', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:02:50', '2014-07-24 21:02:50', 980190962)  (191.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (28.9ms) Completed 200 OK in 64ms (Views: 49.7ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:02:51.048436"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:02:51.048436"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.053985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.104884"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.118270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:02:51.124282"], ["price_cents", 300], ["updated_at", "2014-07-24 21:02:51.124282"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:02:51.131912"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:02:51.124282"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:02:51.124282"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:02:51.131912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.152247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:51.165536"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:02:51.165536"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:02:51.175550"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:51.165536"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:02:51.165536"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:02:51.175550"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.195551"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:02:51.204423"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:02:51.204423"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:02:51.211949"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:02:51.204423"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:02:51.204423"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:02:51.211949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.230445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:51.239234"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:02:51.239234"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:02:51.248208"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:02:51.239234"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:02:51.239234"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:02:51.248208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:02:51.269886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (209.0ms) DROP TABLE "billing_accounts"  (197.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.4ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (165.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.3ms) DROP TABLE "billing_departments"  (174.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (164.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.2ms) DROP TABLE "billing_operators"  (181.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.8ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (157.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.8ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.3ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:03:58', '2014-07-24 21:03:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:03:58', '2014-07-24 21:03:58', 980190962)  (204.0ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.7ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:58.938866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:58.957261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:03:58.964518"], ["price_cents", 300], ["updated_at", "2014-07-24 21:03:58.964518"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:03:58.976903"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:03:58.964518"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:03:58.964518"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:03:58.976903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:58.998161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:03:59.012244"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:03:59.012244"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:03:59.023034"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:03:59.012244"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:03:59.012244"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:03:59.023034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:59.072519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:03:59.084231"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:03:59.084231"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:03:59.092370"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:03:59.084231"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:03:59.084231"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:03:59.092370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:59.110858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:03:59.119528"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:03:59.119528"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:03:59.128434"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:03:59.119528"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:03:59.119528"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:03:59.128434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:59.151234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:03:59.186786"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:03:59.186786"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:03:59.191234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (7.5ms) Completed 200 OK in 27ms (Views: 21.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 6.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.1ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (155.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (181.1ms) DROP TABLE "billing_departments"  (173.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (181.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.4ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.0ms) DROP TABLE "billing_operators"  (164.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.0ms) DROP TABLE "billing_origins"  (172.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.2ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (165.0ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.9ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (172.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:05:35', '2014-07-24 21:05:35', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:05:35', '2014-07-24 21:05:35', 980190962)  (186.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.1ms) Completed 200 OK in 25ms (Views: 20.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.734469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.751714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:05:35.758443"], ["price_cents", 300], ["updated_at", "2014-07-24 21:05:35.758443"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:05:35.767177"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:05:35.758443"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:05:35.758443"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:05:35.767177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.786561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:05:35.795668"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:05:35.795668"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:05:35.807378"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:05:35.795668"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:05:35.795668"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:05:35.807378"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.827912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:05:35.836309"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:05:35.836309"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:05:35.843753"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:05:35.836309"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:05:35.836309"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:05:35.843753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.869171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:05:35.880084"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:05:35.880084"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:05:35.889204"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:05:35.880084"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:05:35.880084"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:05:35.889204"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.909348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:05:35.970994"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:05:35.970994"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:05:35.975851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (303.7ms) DROP TABLE "billing_accounts"  (160.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.7ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (179.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.8ms) DROP TABLE "billing_departments"  (502.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.1ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (148.7ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (189.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (146.9ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (163.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (173.2ms) DROP TABLE "billing_plus"  (164.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (156.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (171.9ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:06:37', '2014-07-24 21:06:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:06:37', '2014-07-24 21:06:37', 980190962)  (202.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.642302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.659255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:06:37.666325"], ["price_cents", 300], ["updated_at", "2014-07-24 21:06:37.666325"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:06:37.675292"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:06:37.666325"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:06:37.666325"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:06:37.675292"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.696127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:06:37.729655"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:06:37.729655"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:06:37.740516"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:06:37.729655"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:06:37.729655"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:06:37.740516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.761449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:06:37.771420"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:06:37.771420"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:06:37.778839"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:06:37.771420"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:06:37.771420"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:06:37.778839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.799080"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:06:37.809060"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:06:37.809060"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:06:37.818434"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:06:37.809060"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:06:37.809060"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:06:37.818434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.838418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.1ms) Completed 200 OK in 28ms (Views: 23.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:06:37.978911"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:06:37.978911"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:06:37.983669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (200.8ms) DROP TABLE "billing_accounts"  (164.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (164.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.9ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (174.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.2ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.2ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (164.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.8ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (149.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.3ms) DROP TABLE "profiles"  (148.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:15', '2014-07-24 21:07:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:07:15', '2014-07-24 21:07:15', 980190962)  (176.4ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 54ms (Views: 40.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:07:15.841809"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:07:15.841809"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:15.847254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:15.957408"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:15.971022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:07:15.977152"], ["price_cents", 300], ["updated_at", "2014-07-24 21:07:15.977152"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:07:15.985830"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:07:15.977152"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:07:15.977152"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:07:15.985830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:16.006979"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:16.017284"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:07:16.017284"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:07:16.028351"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:16.017284"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:07:16.017284"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:07:16.028351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:16.050622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:07:16.058716"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:07:16.058716"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:07:16.067407"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:07:16.058716"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:07:16.058716"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:07:16.067407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:16.086120"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:16.095157"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:07:16.095157"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:07:16.105541"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:16.095157"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:07:16.095157"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:07:16.105541"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:16.126766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (291.6ms) DROP TABLE "billing_accounts"  (159.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (165.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.9ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.2ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (148.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (148.6ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (146.9ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.9ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.8ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (165.5ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.7ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:07:48', '2014-07-24 21:07:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:07:48', '2014-07-24 21:07:48', 980190962)  (192.4ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:48.859335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:48.879513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:07:48.887497"], ["price_cents", 300], ["updated_at", "2014-07-24 21:07:48.887497"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:07:48.897989"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:07:48.887497"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:07:48.887497"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:07:48.897989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:48.920849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:48.935503"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:07:48.935503"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:07:48.946353"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:48.935503"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:07:48.935503"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:07:48.946353"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:48.975062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:07:48.985224"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:07:48.985224"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:07:48.992764"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:07:48.985224"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:07:48.985224"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:07:48.992764"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:49.010950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:49.020869"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:07:49.020869"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:07:49.031034"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:07:49.020869"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:07:49.020869"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:07:49.031034"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:49.051840"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:07:49.089608"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:07:49.089608"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:07:49.094038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (10.0ms) Completed 200 OK in 30ms (Views: 25.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 31ms (Views: 29.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.8ms) DROP TABLE "billing_accounts"  (145.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.0ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.6ms) DROP TABLE "billing_operators"  (156.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.4ms) DROP TABLE "billing_origins"  (166.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.5ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.5ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.9ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (237.5ms) DROP TABLE "billing_tax_groups"  (165.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (165.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:08:31', '2014-07-24 21:08:31', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:08:31', '2014-07-24 21:08:31', 980190962)  (187.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.4ms) Completed 200 OK in 49ms (Views: 36.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:08:31.894373"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:08:31.894373"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:31.900088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:31.925571"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:31.965368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:08:31.971983"], ["price_cents", 300], ["updated_at", "2014-07-24 21:08:31.971983"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:08:31.981016"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:08:31.971983"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:08:31.971983"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:08:31.981016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:32.002633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:08:32.016868"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:08:32.016868"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:08:32.028436"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:08:32.016868"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:08:32.016868"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:08:32.028436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:32.051780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:08:32.062006"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:08:32.062006"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:08:32.070072"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:08:32.062006"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:08:32.062006"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:08:32.070072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:32.090161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:08:32.100738"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:08:32.100738"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:08:32.110371"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:08:32.100738"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:08:32.100738"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:08:32.110371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:08:32.134276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (159.5ms) DROP TABLE "billing_accounts"  (175.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.6ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (173.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.5ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.9ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.1ms) DROP TABLE "billing_origins"  (164.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.1ms) DROP TABLE "billing_payments"  (189.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (180.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (164.9ms) DROP TABLE "billing_plus"  (169.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (209.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (427.8ms) DROP TABLE "profiles"  (305.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:16', '2014-07-24 21:09:16', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:09:16', '2014-07-24 21:09:16', 980190962)  (199.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.5ms) Completed 200 OK in 56ms (Views: 40.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:09:16.991424"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:09:16.991424"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:16.997238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:17.140154"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:17.154601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:09:17.160891"], ["price_cents", 300], ["updated_at", "2014-07-24 21:09:17.160891"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:09:17.169427"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:09:17.160891"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:09:17.160891"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:09:17.169427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:17.189356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:17.198915"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:09:17.198915"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:09:17.209020"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:17.198915"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:09:17.198915"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:09:17.209020"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:17.229451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:09:17.237676"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:09:17.237676"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:09:17.245475"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:09:17.237676"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:09:17.237676"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:09:17.245475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:17.264544"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:17.273590"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:09:17.273590"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:09:17.282942"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:17.273590"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:09:17.273590"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:09:17.282942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:17.306022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (347.9ms) DROP TABLE "billing_accounts"  (160.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.9ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (187.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (173.4ms) DROP TABLE "billing_departments"  (173.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (165.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (164.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.3ms) DROP TABLE "billing_origins"  (181.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.1ms) DROP TABLE "billing_payment_types"  (173.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (140.4ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (171.7ms) DROP TABLE "billing_plus"  (155.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.4ms) DROP TABLE "billing_profiles"  (156.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.4ms) DROP TABLE "billing_tax_groups"  (164.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.9ms) DROP TABLE "profiles"  (157.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:09:37', '2014-07-24 21:09:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:09:37', '2014-07-24 21:09:37', 980190962)  (190.4ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.2ms) Completed 200 OK in 49ms (Views: 35.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.681038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.697836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:09:37.729408"], ["price_cents", 300], ["updated_at", "2014-07-24 21:09:37.729408"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:09:37.738100"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:09:37.729408"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:09:37.729408"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:09:37.738100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.759243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:37.772477"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:09:37.772477"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:09:37.782738"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:37.772477"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:09:37.772477"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:09:37.782738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.803885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:09:37.812403"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:09:37.812403"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:09:37.820214"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:09:37.812403"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:09:37.812403"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:09:37.820214"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.841172"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:37.850269"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:09:37.850269"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:09:37.859556"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:09:37.850269"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:09:37.850269"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:09:37.859556"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.879266"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:09:37.973546"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:09:37.973546"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:09:37.978391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.3ms) DROP TABLE "billing_accounts"  (176.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (180.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (157.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.5ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (180.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.8ms) DROP TABLE "billing_operators"  (189.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_origins"  (181.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.8ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (173.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (468.6ms) DROP TABLE "billing_plus"  (180.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (197.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.2ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:05', '2014-07-24 21:10:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:10:05', '2014-07-24 21:10:05', 980190962)  (181.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (27.5ms) Completed 200 OK in 60ms (Views: 47.5ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:05.703700"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:05.703700"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.709277"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.801521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.819178"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:05.825202"], ["price_cents", 300], ["updated_at", "2014-07-24 21:10:05.825202"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:10:05.833140"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:10:05.825202"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:10:05.825202"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:10:05.833140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.851796"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:05.865758"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:10:05.865758"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:10:05.875538"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:05.865758"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:10:05.865758"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:10:05.875538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.895695"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:05.903259"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:05.903259"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:10:05.910291"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:10:05.903259"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:05.903259"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:10:05.910291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.935151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:05.943878"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:10:05.943878"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:10:05.952882"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:05.943878"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:10:05.943878"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:10:05.952882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:05.972084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (216.9ms) DROP TABLE "billing_accounts"  (159.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.6ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (162.5ms) DROP TABLE "billing_departments"  (164.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (181.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (173.4ms) DROP TABLE "billing_modifiers"  (477.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (221.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.5ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.3ms) DROP TABLE "billing_origins"  (173.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (156.4ms) DROP TABLE "billing_payment_types"  (263.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.4ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (157.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (268.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (159.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.8ms) DROP TABLE "billing_profiles"  (157.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (171.8ms) DROP TABLE "profiles"  (157.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:32', '2014-07-24 21:10:32', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:10:32', '2014-07-24 21:10:32', 980190962)  (201.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:32.871383"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:32.888173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:32.895070"], ["price_cents", 300], ["updated_at", "2014-07-24 21:10:32.895070"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:10:32.904426"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:10:32.895070"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:10:32.895070"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:10:32.904426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:32.926228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:32.943613"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:10:32.943613"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:10:32.954136"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:32.943613"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:10:32.943613"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:10:32.954136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:32.975825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:32.986123"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:32.986123"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:10:32.993860"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:10:32.986123"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:32.986123"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:10:32.993860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:33.013671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:33.024700"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:10:33.024700"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:10:33.034466"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:33.024700"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:10:33.024700"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:10:33.034466"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:33.055101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.1ms) Completed 200 OK in 28ms (Views: 23.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:33.143776"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:33.143776"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:33.148551"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 32ms (Views: 5.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (181.9ms) DROP TABLE "billing_accounts"  (151.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (156.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.4ms) DROP TABLE "billing_charges"  (156.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (213.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.2ms) DROP TABLE "billing_departments"  (189.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.2ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (165.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (156.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.5ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.7ms) DROP TABLE "billing_payment_types"  (180.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.0ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.8ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (165.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.7ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:10:42', '2014-07-24 21:10:42', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:10:42', '2014-07-24 21:10:42', 980190962)  (190.1ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.0ms) Completed 200 OK in 64ms (Views: 49.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.282777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.307177"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:43.314675"], ["price_cents", 300], ["updated_at", "2014-07-24 21:10:43.314675"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:10:43.323684"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:10:43.314675"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:10:43.314675"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:10:43.323684"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.344146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:43.357426"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:10:43.357426"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:10:43.368466"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:43.357426"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:10:43.357426"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:10:43.368466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.389650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:43.398085"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:43.398085"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:10:43.405534"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:10:43.398085"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:43.398085"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:10:43.405534"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.427113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:43.438131"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:10:43.438131"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:10:43.447774"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:10:43.438131"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:10:43.438131"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:10:43.447774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.468218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:10:43.507525"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:10:43.507525"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:10:43.512467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (185.3ms) DROP TABLE "billing_accounts"  (159.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (165.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (188.4ms) DROP TABLE "billing_departments"  (181.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.6ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (174.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.3ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.6ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.7ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.1ms) DROP TABLE "billing_tax_groups"  (172.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:07', '2014-07-24 21:11:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:11:07', '2014-07-24 21:11:07', 980190962)  (181.7ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.4ms) Completed 200 OK in 54ms (Views: 40.4ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.739940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.755724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:11:07.762318"], ["price_cents", 300], ["updated_at", "2014-07-24 21:11:07.762318"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:11:07.770612"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:11:07.762318"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:11:07.762318"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:11:07.770612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.789806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:07.799119"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:11:07.799119"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:11:07.810378"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:07.799119"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:11:07.799119"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:11:07.810378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.830946"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:11:07.839326"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:11:07.839326"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:11:07.846770"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:11:07.839326"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:11:07.839326"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:11:07.846770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.868361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:07.878908"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:11:07.878908"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:11:07.888279"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:07.878908"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:11:07.878908"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:11:07.888279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.908929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:11:07.949084"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:11:07.949084"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:07.954100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (244.2ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (147.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.4ms) DROP TABLE "billing_charges"  (172.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.6ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.9ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (197.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.8ms) DROP TABLE "billing_payment_types"  (320.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (164.1ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (148.8ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.9ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.7ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:11:46', '2014-07-24 21:11:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:11:46', '2014-07-24 21:11:46', 980190962)  (186.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.6ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.466807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.483928"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:11:46.491008"], ["price_cents", 300], ["updated_at", "2014-07-24 21:11:46.491008"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:11:46.500117"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:11:46.491008"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:11:46.491008"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:11:46.500117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.547707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:46.557779"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:11:46.557779"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:11:46.571656"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:46.557779"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:11:46.557779"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:11:46.571656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.592989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:11:46.603080"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:11:46.603080"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:11:46.610867"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:11:46.603080"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:11:46.603080"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:11:46.610867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.633014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:46.642609"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:11:46.642609"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:11:46.652082"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:11:46.642609"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:11:46.642609"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:11:46.652082"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.673043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (11.8ms) Completed 200 OK in 31ms (Views: 26.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:11:46.760865"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:11:46.760865"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:11:46.765448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (163.4ms) DROP TABLE "billing_accounts"  (158.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.7ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (180.8ms) DROP TABLE "billing_departments"  (180.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.2ms) DROP TABLE "billing_modifiers"  (165.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (139.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.4ms) DROP TABLE "billing_operators"  (164.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.1ms) DROP TABLE "billing_origins"  (172.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.5ms) DROP TABLE "billing_payment_types"  (180.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.9ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (226.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (186.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (131.0ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (181.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.1ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:13:40', '2014-07-24 21:13:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:13:40', '2014-07-24 21:13:40', 980190962)  (210.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (28.7ms) Completed 200 OK in 63ms (Views: 49.4ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.516008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.531448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:13:40.538041"], ["price_cents", 300], ["updated_at", "2014-07-24 21:13:40.538041"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:13:40.546322"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:13:40.538041"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:13:40.538041"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:13:40.546322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.565176"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:13:40.574242"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:13:40.574242"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:13:40.584956"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:13:40.574242"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:13:40.574242"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:13:40.584956"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.605823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:13:40.614039"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:13:40.614039"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:13:40.621711"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:13:40.614039"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:13:40.614039"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:13:40.621711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.641546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:13:40.650566"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:13:40.650566"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:13:40.660189"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:13:40.650566"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:13:40.650566"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:13:40.660189"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.680228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:13:40.733360"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:13:40.733360"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:13:40.738099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (184.0ms) DROP TABLE "billing_accounts"  (151.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (394.6ms) DROP TABLE "billing_charges"  (180.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (180.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (179.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (157.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (181.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.3ms) DROP TABLE "billing_origins"  (197.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (164.0ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.0ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.9ms) DROP TABLE "billing_plus"  (157.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (164.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.9ms) DROP TABLE "billing_profiles"  (173.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.9ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (148.0ms) DROP TABLE "profiles"  (173.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:08', '2014-07-24 21:14:08', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.0ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:14:08', '2014-07-24 21:14:08', 980190962)  (180.4ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.9ms) Completed 200 OK in 54ms (Views: 40.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 7.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:14:08.952832"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:14:08.952832"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:08.957957"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:08.979701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:08.993511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:14:08.999752"], ["price_cents", 300], ["updated_at", "2014-07-24 21:14:08.999752"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:14:09.007714"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:14:08.999752"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:14:08.999752"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:14:09.007714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:09.027258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:09.041373"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:14:09.041373"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:14:09.051697"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:09.041373"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:14:09.041373"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:14:09.051697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:09.071767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:14:09.080623"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:14:09.080623"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:14:09.088704"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:14:09.080623"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:14:09.080623"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:14:09.088704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:09.108109"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:09.117371"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:14:09.117371"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:14:09.126609"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:09.117371"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:14:09.117371"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:14:09.126609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:09.149341"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (190.5ms) DROP TABLE "billing_accounts"  (175.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.1ms) select sqlite_version(*)  (246.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.6ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (164.0ms) DROP TABLE "billing_modifiers"  (165.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.5ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.3ms) DROP TABLE "billing_payment_types"  (164.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.2ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.9ms) DROP TABLE "billing_plus"  (182.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.9ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (484.8ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:14:37', '2014-07-24 21:14:37', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:14:37', '2014-07-24 21:14:37', 980190962)  (188.6ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.2ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (9.6ms) Completed 200 OK in 31ms (Views: 25.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 14ms (Views: 12.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.017941"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.032942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:14:38.039619"], ["price_cents", 300], ["updated_at", "2014-07-24 21:14:38.039619"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:14:38.048034"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:14:38.039619"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:14:38.039619"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:14:38.048034"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.068449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:38.077915"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:14:38.077915"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:14:38.088027"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:38.077915"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:14:38.077915"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:14:38.088027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.108254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:14:38.116497"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:14:38.116497"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:14:38.124800"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:14:38.116497"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:14:38.116497"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:14:38.124800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.144184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:38.153402"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:14:38.153402"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:14:38.163186"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:14:38.153402"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:14:38.153402"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:14:38.163186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.186546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:14:38.253001"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:14:38.253001"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:14:38.258185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (207.7ms) DROP TABLE "billing_accounts"  (146.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (155.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.1ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_departments"  (172.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (188.4ms) DROP TABLE "billing_modifiers"  (180.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (180.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.3ms) DROP TABLE "billing_operators"  (156.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (163.5ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (172.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (166.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (204.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.4ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.8ms) DROP TABLE "billing_tax_groups"  (255.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:05', '2014-07-24 21:15:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:15:05', '2014-07-24 21:15:05', 980190962)  (201.5ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:15:05.808095"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:15:05.808095"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:05.814587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.5ms) Completed 200 OK in 30ms (Views: 24.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 32ms (Views: 29.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:05.927939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:05.942221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:15:05.948540"], ["price_cents", 300], ["updated_at", "2014-07-24 21:15:05.948540"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:15:05.957113"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:15:05.948540"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:15:05.948540"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:15:05.957113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:05.977065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:05.991135"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:15:05.991135"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:15:06.001456"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:05.991135"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:15:05.991135"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:15:06.001456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:06.022875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:15:06.031437"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:15:06.031437"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:15:06.038891"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:15:06.031437"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:15:06.031437"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:15:06.038891"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:06.057860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:06.068089"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:15:06.068089"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:15:06.078641"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:06.068089"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:15:06.068089"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:15:06.078641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:06.099916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (195.1ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.9ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (173.3ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.7ms) DROP TABLE "billing_operators"  (164.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (139.0ms) DROP TABLE "billing_origins"  (246.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (320.6ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.2ms) DROP TABLE "billing_payments"  (189.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.2ms) DROP TABLE "billing_plus"  (157.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (181.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (122.6ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:15:51', '2014-07-24 21:15:51', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:15:51', '2014-07-24 21:15:51', 980190962)  (191.7ms) commit transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.2ms) Completed 200 OK in 49ms (Views: 36.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.534887"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.576781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:15:51.583394"], ["price_cents", 300], ["updated_at", "2014-07-24 21:15:51.583394"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:15:51.591939"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:15:51.583394"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:15:51.583394"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:15:51.591939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.610816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:51.625459"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:15:51.625459"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:15:51.635496"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:51.625459"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:15:51.625459"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:15:51.635496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.655749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:15:51.663658"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:15:51.663658"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:15:51.672333"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:15:51.663658"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:15:51.663658"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:15:51.672333"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.691045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:51.699916"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:15:51.699916"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:15:51.709009"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:15:51.699916"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:15:51.699916"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:15:51.709009"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.730542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:15:51.766431"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:15:51.766431"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:15:51.770934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.6ms) DROP TABLE "billing_accounts"  (154.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (180.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (172.0ms) DROP TABLE "billing_charges"  (173.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.3ms) DROP TABLE "billing_departments"  (172.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (164.9ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.4ms) DROP TABLE "billing_operators"  (156.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.2ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.4ms) DROP TABLE "billing_plus"  (190.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) DROP TABLE "billing_tax_groups"  (164.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:16:46', '2014-07-24 21:16:46', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:16:46', '2014-07-24 21:16:46', 980190962)  (187.4ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Billing::PaymentTest: test_payment_type_should_be_account's_origin_payment_model -------------------------------------------------------------------------------- Billing::Payment Load (0.7ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:16:47.050410"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:16:47.050410"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.057265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.4ms) Completed 200 OK in 26ms (Views: 21.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.133636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.173685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:16:47.180483"], ["price_cents", 300], ["updated_at", "2014-07-24 21:16:47.180483"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:16:47.189101"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:16:47.180483"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:16:47.180483"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:16:47.189101"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.209352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:16:47.222639"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:16:47.222639"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:16:47.232952"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:16:47.222639"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:16:47.222639"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:16:47.232952"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.252989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:16:47.261625"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:16:47.261625"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:16:47.268886"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:16:47.261625"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:16:47.261625"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:16:47.268886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.287281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:16:47.296138"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:16:47.296138"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:16:47.305027"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:16:47.296138"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:16:47.296138"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:16:47.305027"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:16:47.325467"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (226.3ms) DROP TABLE "billing_accounts"  (162.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.6ms) DROP TABLE "billing_departments"  (164.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.3ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (165.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.5ms) DROP TABLE "billing_origins"  (246.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.6ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (130.5ms) DROP TABLE "billing_payments"  (156.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (183.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (178.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (162.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.2ms) DROP TABLE "billing_profiles"  (158.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (180.1ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.2ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:17:20', '2014-07-24 21:17:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:17:20', '2014-07-24 21:17:20', 980190962)  (177.7ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.2ms) Completed 200 OK in 54ms (Views: 40.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ Billing::PaymentTest: test_type_should_be_account's_origin_payment_model ------------------------------------------------------------------------ Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:17:20.607869"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:17:20.607869"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.613069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.685453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.699772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:17:20.706447"], ["price_cents", 300], ["updated_at", "2014-07-24 21:17:20.706447"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:17:20.714591"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:17:20.706447"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:17:20.706447"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:17:20.714591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.734040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:17:20.743245"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:17:20.743245"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:17:20.752881"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:17:20.743245"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:17:20.743245"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:17:20.752881"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.773931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:17:20.781382"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:17:20.781382"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:17:20.788317"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:17:20.781382"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:17:20.781382"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:17:20.788317"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.805992"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:17:20.815277"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:17:20.815277"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:17:20.824909"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:17:20.815277"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:17:20.815277"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:17:20.824909"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:17:20.845368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (192.7ms) DROP TABLE "billing_accounts"  (154.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.8ms) DROP TABLE "billing_charges"  (164.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_departments"  (156.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.4ms) DROP TABLE "billing_modifiers"  (166.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.7ms) DROP TABLE "billing_operators"  (172.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.7ms) DROP TABLE "billing_origins"  (197.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (163.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (156.4ms) DROP TABLE "billing_payment_types"  (173.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.1ms) DROP TABLE "billing_payments"  (156.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (172.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.2ms) DROP TABLE "billing_plus"  (165.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.1ms) DROP TABLE "billing_profiles"  (181.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_tax_groups"  (156.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:25:58', '2014-07-24 21:25:58', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:25:58', '2014-07-24 21:25:58', 980190962)  (180.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.2ms) Completed 200 OK in 52ms (Views: 35.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.4ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ Billing::PaymentTest: test_type_should_be_account's_origin_payment_model ------------------------------------------------------------------------ Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:25:59.360791"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:25:59.360791"], ["value_cents", 100]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.366168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.409531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.424657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:25:59.430753"], ["price_cents", 300], ["updated_at", "2014-07-24 21:25:59.430753"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:25:59.439233"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:25:59.430753"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:25:59.430753"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:25:59.439233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.458546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:25:59.471631"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:25:59.471631"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:25:59.481506"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:25:59.471631"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:25:59.471631"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:25:59.481506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.502242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:25:59.511204"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:25:59.511204"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:25:59.518985"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:25:59.511204"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:25:59.511204"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:25:59.518985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.537767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:25:59.547002"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:25:59.547002"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:25:59.556385"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:25:59.547002"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:25:59.547002"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:25:59.556385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:25:59.576879"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 32ms (Views: 30.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (156.1ms) DROP TABLE "billing_accounts"  (152.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.0ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.6ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (164.3ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (157.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (164.1ms) DROP TABLE "billing_operators"  (156.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.1ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.0ms) DROP TABLE "billing_payments"  (181.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.9ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (156.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (156.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.1ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:01', '2014-07-24 21:33:01', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:33:01', '2014-07-24 21:33:01', 980190962)  (188.9ms) commit transaction  (0.3ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.6ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.3ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:01.857580"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:01.857580"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:01.864429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.1ms) Completed 200 OK in 25ms (Views: 20.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 15ms (Views: 13.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:02.019708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:02.033382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:02.039379"], ["price_cents", 300], ["updated_at", "2014-07-24 21:33:02.039379"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:33:02.049177"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:33:02.039379"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:33:02.039379"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:33:02.049177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:02.068261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:02.080990"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:33:02.080990"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:33:02.090577"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:02.080990"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:33:02.080990"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:33:02.090577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:02.112124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:02.120055"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:02.120055"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:33:02.126902"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:33:02.120055"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:02.120055"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:33:02.126902"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:02.144958"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:02.155409"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:33:02.155409"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:33:02.164016"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:02.155409"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:33:02.155409"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:33:02.164016"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:02.183664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.6ms) DROP TABLE "billing_accounts"  (150.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (156.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.3ms) DROP TABLE "billing_departments"  (173.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.8ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (163.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.9ms) DROP TABLE "billing_operators"  (139.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.9ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (178.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (158.2ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (171.7ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.7ms) DROP TABLE "billing_plus"  (172.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (214.3ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.3ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:25', '2014-07-24 21:33:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:33:25', '2014-07-24 21:33:25', 980190962)  (183.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.247801"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.267690"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:26.275464"], ["price_cents", 300], ["updated_at", "2014-07-24 21:33:26.275464"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:33:26.284999"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:33:26.275464"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:33:26.275464"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:33:26.284999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.305323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:26.318947"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:33:26.318947"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:33:26.329835"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:26.318947"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:33:26.318947"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:33:26.329835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.376447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:26.387492"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:26.387492"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:33:26.395265"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:33:26.387492"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:26.387492"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:33:26.395265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.414058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:26.423086"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:33:26.423086"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:33:26.433057"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:26.423086"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:33:26.423086"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:33:26.433057"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.454012"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.4ms) Completed 200 OK in 22ms (Views: 18.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:26.539398"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:26.539398"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:26.544427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 14ms (Views: 12.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (164.7ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (157.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (288.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.7ms) DROP TABLE "billing_operators"  (164.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.1ms) DROP TABLE "billing_origins"  (165.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (148.4ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (171.8ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (254.3ms) DROP TABLE "billing_plus"  (246.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (254.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:33:57', '2014-07-24 21:33:57', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:33:57', '2014-07-24 21:33:57', 980190962)  (200.8ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.2ms) Completed 200 OK in 65ms (Views: 49.9ms | ActiveRecord: 1.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.618946"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.634695"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:57.641598"], ["price_cents", 300], ["updated_at", "2014-07-24 21:33:57.641598"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:33:57.650212"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:33:57.641598"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:33:57.641598"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:33:57.650212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.669518"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:57.678421"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:33:57.678421"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:33:57.688623"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:57.678421"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:33:57.678421"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:33:57.688623"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.710115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:57.718171"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:57.718171"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:33:57.725623"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:33:57.718171"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:57.718171"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:33:57.725623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.745611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:57.754664"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:33:57.754664"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:33:57.763862"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:33:57.754664"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:33:57.754664"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:33:57.763862"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.784372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:33:57.854678"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:33:57.854678"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:33:57.859542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (24.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (210.0ms) DROP TABLE "billing_accounts"  (159.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (584.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (164.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.9ms) DROP TABLE "billing_departments"  (173.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (165.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (287.2ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (130.9ms) DROP TABLE "billing_operators"  (156.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (139.5ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (148.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (172.5ms) DROP TABLE "billing_payment_types"  (174.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.5ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (180.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.3ms) DROP TABLE "profiles"  (156.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 21:34:45', '2014-07-24 21:34:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 21:34:45', '2014-07-24 21:34:45', 980190962)  (191.4ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.6ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.3ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.526955"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:34:45.526955"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.533810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.571121"], ["payment_type_id", 817124681], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:34:45.571121"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.580849"]] SQL (0.3ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.571121"], ["id", 980190963], ["payment_type_id", 817124681], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:34:45.571121"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.580849"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.605791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.628421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.634739"], ["price_cents", 300], ["updated_at", "2014-07-24 21:34:45.634739"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:34:45.642800"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.634739"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 21:34:45.634739"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 21:34:45.642800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.663738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:34:45.676773"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 21:34:45.676773"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:34:45.686858"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:34:45.676773"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 21:34:45.676773"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 21:34:45.686858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.709111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.717179"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:34:45.717179"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:34:45.724227"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 21:34:45.717179"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 21:34:45.717179"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 21:34:45.724227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.742009"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:34:45.750673"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 21:34:45.750673"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:34:45.761562"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 21:34:45.750673"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 21:34:45.750673"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 21:34:45.761562"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 21:34:45.782148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.2ms) Completed 200 OK in 28ms (Views: 23.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.5ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (209.7ms) DROP TABLE "billing_accounts"  (152.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (197.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.0ms) DROP TABLE "billing_charges"  (404.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (172.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.3ms) DROP TABLE "billing_modifiers"  (181.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (174.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.6ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (165.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (156.1ms) DROP TABLE "billing_payment_types"  (502.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (130.9ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.7ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (156.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (156.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.3ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.7ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:07:03', '2014-07-24 22:07:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 22:07:03', '2014-07-24 22:07:03', 980190962)  (186.8ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.1ms) Completed 200 OK in 53ms (Views: 35.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:07:03.410600"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:07:03.427199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 22:07:03.434103"], ["price_cents", 300], ["updated_at", "2014-07-24 22:07:03.434103"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 22:07:03.467824"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 22:07:03.434103"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 22:07:03.434103"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 22:07:03.467824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:07:03.487127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:07:03.500908"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 22:07:03.500908"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 22:07:03.511456"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:07:03.500908"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 22:07:03.500908"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 22:07:03.511456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:07:03.531728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:07:03.543662"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:07:03.553382"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 22:07:03.553382"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 22:07:03.563457"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:07:03.553382"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 22:07:03.553382"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 22:07:03.563457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:07:03.583858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 13ms (Views: 10.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.9ms) DROP TABLE "billing_accounts"  (148.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (164.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (147.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (139.5ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (165.0ms) DROP TABLE "billing_departments"  (164.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.8ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (146.9ms) DROP TABLE "billing_operators"  (164.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.4ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (240.7ms) DROP TABLE "billing_payment_types"  (170.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.0ms) DROP TABLE "billing_payments"  (174.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (164.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (181.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (138.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.7ms) DROP TABLE "billing_profiles"  (173.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.1ms) DROP TABLE "billing_tax_groups"  (165.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-24 22:12:05', '2014-07-24 22:12:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-24 22:12:05', '2014-07-24 22:12:05', 980190962)  (192.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (28.4ms) Completed 200 OK in 61ms (Views: 48.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.185097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (25.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.228425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.235292"], ["price_cents", 300], ["updated_at", "2014-07-24 22:12:06.235292"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 22:12:06.244104"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.235292"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-24 22:12:06.235292"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-24 22:12:06.244104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.264409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:12:06.278250"], ["fixed_value_cents", -100], ["updated_at", "2014-07-24 22:12:06.278250"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 22:12:06.289210"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:12:06.278250"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-24 22:12:06.278250"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-24 22:12:06.289210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.311113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.319401"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 22:12:06.319401"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 22:12:06.326617"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.319401"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 22:12:06.319401"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-24 22:12:06.326617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.346466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:12:06.355393"], ["fixed_value_cents", 100], ["updated_at", "2014-07-24 22:12:06.355393"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 22:12:06.365191"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-24 22:12:06.355393"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-24 22:12:06.355393"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-24 22:12:06.365191"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.386256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.424179"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 22:12:06.424179"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.428988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.458775"], ["payment_type_id", 817124681], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 22:12:06.458775"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.467417"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-24 22:12:06.458775"], ["id", 980190963], ["payment_type_id", 817124681], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-24 22:12:06.458775"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-24 22:12:06.467417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (69.6ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (158.2ms) DROP TABLE "billing_accounts"  (163.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (156.8ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (151.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.8ms) DROP TABLE "billing_operators"  (164.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (189.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (180.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.7ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (165.0ms) DROP TABLE "billing_plus"  (190.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (221.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (196.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.7ms) DROP TABLE "billing_profiles"  (189.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (172.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.0ms) DROP TABLE "profiles"  (205.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.7ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 370448595) Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374, 980190962, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:21:44', '2014-07-25 11:21:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:21:44', '2014-07-25 11:21:44', 980190962)  (196.9ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.6ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (95.7ms) Completed 200 OK in 219ms (Views: 191.3ms | ActiveRecord: 0.9ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 32ms (Views: 29.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 18ms (Views: 15.7ms | ActiveRecord: 1.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 59ms (Views: 57.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 17ms (Views: 14.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (253.2ms) DROP TABLE "billing_accounts"  (158.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.8ms) DROP TABLE "billing_charges"  (156.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (173.1ms) DROP TABLE "billing_departments"  (173.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.1ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.3ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (237.6ms) DROP TABLE "billing_origins"  (197.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.4ms) DROP TABLE "billing_payments"  (173.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.9ms) DROP TABLE "billing_plus"  (164.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.7ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (180.2ms) DROP TABLE "billing_tax_groups"  (172.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.4ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:22:46', '2014-07-25 11:22:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:22:46', '2014-07-25 11:22:46', 980190962)  (191.9ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.6ms) Completed 200 OK in 50ms (Views: 33.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 8.5ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (238.3ms) DROP TABLE "billing_accounts"  (155.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (237.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (319.9ms) DROP TABLE "billing_charges"  (164.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (173.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (149.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.8ms) DROP TABLE "billing_modifiers"  (163.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.9ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.1ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (164.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (157.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.0ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:23:38', '2014-07-25 11:23:38', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:23:38', '2014-07-25 11:23:38', 980190962)  (190.5ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.6ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.5ms) Completed 200 OK in 49ms (Views: 36.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.7ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.4ms) DROP TABLE "billing_charges"  (164.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (180.1ms) DROP TABLE "billing_departments"  (164.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (174.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.9ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.1ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.8ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.0ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.3ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (164.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.3ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.2ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.2ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:02', '2014-07-25 11:24:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:24:02', '2014-07-25 11:24:02', 980190962)  (183.7ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (3.7ms) Completed 200 OK in 24ms (Views: 19.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (164.6ms) DROP TABLE "billing_accounts"  (158.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.1ms) select sqlite_version(*)  (164.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (148.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.5ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (180.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (271.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (171.9ms) DROP TABLE "billing_origins"  (182.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.2ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.9ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.5ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.6ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.5ms) DROP TABLE "billing_tax_groups"  (166.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:45', '2014-07-25 11:24:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:24:45', '2014-07-25 11:24:45', 980190962)  (199.6ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (9.5ms) Completed 200 OK in 43ms (Views: 28.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.9ms) DROP TABLE "billing_accounts"  (169.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (196.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (172.0ms) DROP TABLE "billing_charges"  (164.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (157.0ms) DROP TABLE "billing_departments"  (164.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (171.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (156.4ms) DROP TABLE "billing_operators"  (189.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.5ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (146.6ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (124.1ms) DROP TABLE "billing_payments"  (164.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.3ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.9ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.2ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (156.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:24:58', '2014-07-25 11:24:58', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:24:58', '2014-07-25 11:24:58', 980190962)  (186.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.3ms) Completed 200 OK in 53ms (Views: 35.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 8.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (196.2ms) DROP TABLE "billing_accounts"  (167.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.8ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (165.1ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.1ms) DROP TABLE "billing_operators"  (255.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (181.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.5ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (403.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (146.8ms) DROP TABLE "billing_plus"  (157.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (138.9ms) DROP TABLE "billing_profiles"  (172.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:26:22', '2014-07-25 11:26:22', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:26:22', '2014-07-25 11:26:22', 980190962)  (192.3ms) commit transaction  (0.3ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (20.0ms) Completed 200 OK in 54ms (Views: 40.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:26:22.795236"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:26:22.795236"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:22.801305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:22.942086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:22.956745"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:26:22.963152"], ["price_cents", 300], ["updated_at", "2014-07-25 11:26:22.963152"]] SQL (87.0ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:26:22.971576"]] SQL (0.6ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:26:22.963152"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 11:26:22.963152"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:26:22.971576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:23.111741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:26:23.129255"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 11:26:23.129255"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:26:23.143671"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:26:23.129255"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 11:26:23.129255"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:26:23.143671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:23.171112"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:26:23.180718"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:26:23.180718"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:26:23.189437"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:26:23.180718"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:26:23.180718"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:26:23.189437"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:23.210275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:26:23.222376"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 11:26:23.222376"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:26:23.258162"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:26:23.222376"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 11:26:23.222376"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:26:23.258162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:26:23.280043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (174.5ms) DROP TABLE "billing_accounts"  (160.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.6ms) DROP TABLE "billing_charges"  (155.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.0ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.7ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.5ms) DROP TABLE "billing_operators"  (156.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.3ms) DROP TABLE "billing_origins"  (181.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.0ms) DROP TABLE "billing_payment_types"  (164.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (154.5ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (139.0ms) DROP TABLE "billing_plus"  (156.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (164.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.2ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:56:53', '2014-07-25 11:56:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:56:53', '2014-07-25 11:56:53', 980190962)  (209.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.2ms) Completed 200 OK in 52ms (Views: 35.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 25ms (Views: 21.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.342309"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.384546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:56:54.391350"], ["price_cents", 300], ["updated_at", "2014-07-25 11:56:54.391350"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:56:54.400427"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:56:54.391350"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 11:56:54.391350"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:56:54.400427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.420618"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:56:54.434765"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 11:56:54.434765"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:56:54.445648"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:56:54.434765"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 11:56:54.434765"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:56:54.445648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.467085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:56:54.475121"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:56:54.475121"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:56:54.482657"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:56:54.475121"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:56:54.475121"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:56:54.482657"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.502971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:56:54.512319"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 11:56:54.512319"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:56:54.521699"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:56:54.512319"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 11:56:54.512319"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:56:54.521699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.542550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:56:54.583020"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:56:54.583020"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:56:54.587677"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.4ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.1ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (164.7ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.9ms) DROP TABLE "billing_operators"  (172.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (146.9ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.1ms) DROP TABLE "billing_payment_types"  (164.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (173.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (164.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (155.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (132.4ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.6ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.9ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:58:21', '2014-07-25 11:58:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:58:21', '2014-07-25 11:58:21', 980190962)  (188.6ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (10.6ms) Completed 200 OK in 45ms (Views: 30.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.452197"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:58:21.452197"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.457858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------- Billing::PaymentTest: test_single_cash_payments ----------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.512248"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:58:21.512248"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.520762"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.512248"], ["id", 980190963], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:58:21.512248"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.520762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.547446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.563388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.569614"], ["price_cents", 300], ["updated_at", "2014-07-25 11:58:21.569614"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:58:21.577816"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.569614"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 11:58:21.569614"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:58:21.577816"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.597994"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:58:21.611220"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 11:58:21.611220"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:58:21.621104"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:58:21.611220"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 11:58:21.611220"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:58:21.621104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.647199"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.655280"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:58:21.655280"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:58:21.663244"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:58:21.655280"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:58:21.655280"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:58:21.663244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.682106"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:58:21.692537"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 11:58:21.692537"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:58:21.702037"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:58:21.692537"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 11:58:21.692537"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:58:21.702037"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:58:21.722997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.3ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (188.4ms) DROP TABLE "billing_accounts"  (152.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.3ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (163.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (173.2ms) DROP TABLE "billing_departments"  (172.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.1ms) DROP TABLE "billing_operators"  (231.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (138.6ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (172.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.4ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (172.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (171.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.8ms) DROP TABLE "billing_profiles"  (166.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (147.3ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.6ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374) Fixture Delete (0.0ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:04', '2014-07-25 11:59:04', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:59:04', '2014-07-25 11:59:04', 980190962)  (187.6ms) commit transaction  (0.2ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.8ms) Completed 200 OK in 50ms (Views: 34.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.287973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.305115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.311759"], ["price_cents", 300], ["updated_at", "2014-07-25 11:59:05.311759"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:59:05.344271"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.311759"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 11:59:05.311759"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:59:05.344271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.364524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:05.377731"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 11:59:05.377731"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:59:05.387837"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:05.377731"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 11:59:05.377731"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:59:05.387837"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.409230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.417612"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:05.417612"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:59:05.425324"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.417612"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:05.417612"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:59:05.425324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.443616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:05.453402"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 11:59:05.453402"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:59:05.463015"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:05.453402"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 11:59:05.453402"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:59:05.463015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.484361"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.572550"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:05.572550"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.577513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Billing::PaymentTest: test_shoul_be_single_cash_payments -------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.591567"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:05.591567"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.600054"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:59:05.591567"], ["id", 980190963], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:05.591567"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:05.600054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 5.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.1ms) DROP TABLE "billing_accounts"  (151.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (180.2ms) DROP TABLE "billing_charges"  (165.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.8ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.2ms) DROP TABLE "billing_modifiers"  (156.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (156.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.2ms) DROP TABLE "billing_operators"  (165.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_origins"  (189.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (156.9ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (138.9ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.1ms) DROP TABLE "billing_plus"  (155.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (197.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (246.3ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (149.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 11:59:36', '2014-07-25 11:59:36', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 11:59:36', '2014-07-25 11:59:36', 980190962)  (191.1ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (28.5ms) Completed 200 OK in 63ms (Views: 48.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.440110"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:36.440110"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.445977"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Billing::PaymentTest: test_shoul_be_single_cash_payments -------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.461752"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:36.461752"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.495418"]] SQL (0.3ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.461752"], ["id", 980190963], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:36.461752"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["charges_sum_cents", 300], ["payments_sum_cents", 400], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.495418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.614490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.628410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.634808"], ["price_cents", 300], ["updated_at", "2014-07-25 11:59:36.634808"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:59:36.643364"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.634808"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 11:59:36.634808"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 11:59:36.643364"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.663506"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:36.672577"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 11:59:36.672577"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:59:36.682628"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:36.672577"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 11:59:36.672577"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 11:59:36.682628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.703324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.711031"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:36.711031"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:59:36.718671"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 11:59:36.711031"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 11:59:36.711031"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 11:59:36.718671"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.737302"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:36.746416"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 11:59:36.746416"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:59:36.756440"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 11:59:36.746416"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 11:59:36.746416"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 11:59:36.756440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 11:59:36.782359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (167.9ms) DROP TABLE "billing_accounts"  (159.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (155.5ms) DROP TABLE "billing_departments"  (157.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.5ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.8ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (172.5ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.2ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (157.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (156.4ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (253.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.0ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:00:06', '2014-07-25 12:00:06', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:00:06', '2014-07-25 12:00:06', 980190962)  (183.4ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (19.2ms) Completed 200 OK in 54ms (Views: 40.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 11ms (Views: 7.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:00:07.373511"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:00:07.373511"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.378715"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Billing::PaymentTest: test_shoul_be_single_cash_payments -------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:00:07.394168"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:00:07.394168"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.398808"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.476396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.491110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:00:07.497664"], ["price_cents", 300], ["updated_at", "2014-07-25 12:00:07.497664"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:00:07.505766"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:00:07.497664"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:00:07.497664"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:00:07.505766"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.525134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:00:07.534090"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:00:07.534090"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:00:07.544899"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:00:07.534090"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:00:07.534090"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:00:07.544899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.566175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:00:07.574499"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:00:07.574499"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:00:07.582167"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:00:07.574499"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:00:07.574499"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:00:07.582167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.625906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:00:07.634880"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:00:07.634880"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:00:07.644031"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:00:07.634880"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:00:07.634880"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:00:07.644031"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:00:07.663590"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.4ms) DROP TABLE "billing_accounts"  (158.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (172.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (148.2ms) DROP TABLE "billing_charges"  (164.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (163.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (180.3ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (157.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.3ms) DROP TABLE "billing_modifiers"  (238.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (172.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (148.4ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (164.0ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.5ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:15:15', '2014-07-25 12:15:15', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:15:15', '2014-07-25 12:15:15', 980190962)  (185.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.9ms) Completed 200 OK in 50ms (Views: 34.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 17ms (Views: 13.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.570142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.584971"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:15:15.590945"], ["price_cents", 300], ["updated_at", "2014-07-25 12:15:15.590945"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:15:15.599342"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:15:15.590945"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:15:15.590945"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:15:15.599342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.619065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:15:15.632318"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:15:15.632318"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:15:15.642403"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:15:15.632318"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:15:15.632318"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:15:15.642403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.662935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:15:15.671364"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:15:15.671364"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:15:15.678658"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:15:15.671364"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:15:15.671364"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:15:15.678658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.696643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:15:15.706362"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:15:15.706362"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:15:15.716150"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:15:15.706362"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:15:15.706362"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:15:15.716150"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.736945"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:15:15.822844"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:15:15.822844"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.827579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:15:15.860143"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:15:15.860143"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:15:15.864819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (214.8ms) DROP TABLE "billing_accounts"  (151.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.1ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.7ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (164.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (165.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (131.0ms) DROP TABLE "billing_operators"  (156.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.8ms) DROP TABLE "billing_origins"  (181.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.0ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.3ms) DROP TABLE "billing_payments"  (172.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer)  (460.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (229.6ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (163.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (156.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.0ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.4ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (191.1ms) DROP TABLE "billing_accounts"  (161.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (237.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.4ms) DROP TABLE "billing_charges"  (156.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (171.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.3ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (138.8ms) DROP TABLE "billing_operators"  (165.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (402.6ms) DROP TABLE "billing_origins"  (164.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.2ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255))  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.6ms) DROP TABLE "billing_plus"  (159.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (138.5ms) DROP TABLE "billing_profiles"  (157.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (156.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.5ms) DROP TABLE "profiles"  (148.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (121.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725122914') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (161.1ms) DROP TABLE "billing_accounts"  (155.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)   (163.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (139.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (155.3ms) DROP TABLE "billing_charges"  (164.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.1ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (165.0ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.9ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (139.0ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.0ms) DROP TABLE "billing_origins"  (172.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (172.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (146.6ms) DROP TABLE "billing_payments"  (165.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255))  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (163.8ms) DROP TABLE "billing_plus"  (155.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.7ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.3ms) DROP TABLE "profiles"  (147.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.2ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:32:47', '2014-07-25 12:32:47', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:32:47', '2014-07-25 12:32:47', 980190962)  (192.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:32:48.102718"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:32:48.124427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:32:48.132680"], ["price_cents", 300], ["updated_at", "2014-07-25 12:32:48.132680"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:32:48.142951"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:32:48.132680"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:32:48.132680"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:32:48.142951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:32:48.165338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:32:48.204873"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:32:48.204873"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:32:48.215760"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:32:48.204873"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:32:48.204873"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:32:48.215760"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:32:48.239470"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:32:48.251491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:32:48.260431"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:32:48.260431"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:32:48.269524"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:32:48.260431"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:32:48.260431"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:32:48.269524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:32:48.292340"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Completed 500 Internal Server Error in 5ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 26ms (Views: 23.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.4ms) DROP TABLE "billing_accounts"  (159.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (147.2ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (163.7ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (165.3ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.2ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.6ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.6ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (130.9ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255))  (164.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (221.2ms) DROP TABLE "billing_plus"  (164.4ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (173.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.2ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (155.4ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.4ms) DROP TABLE "profiles"  (173.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:33:29', '2014-07-25 12:33:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:33:29', '2014-07-25 12:33:29', 980190962)  (186.5ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (4.0ms) Completed 200 OK in 24ms (Views: 20.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:33:29.830252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:33:29.844650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:33:29.850657"], ["price_cents", 300], ["updated_at", "2014-07-25 12:33:29.850657"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:33:29.858637"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:33:29.850657"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:33:29.850657"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:33:29.858637"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:33:29.878488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:33:29.887471"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:33:29.887471"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:33:29.897053"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:33:29.887471"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:33:29.887471"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:33:29.897053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:33:29.916680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:33:29.939272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:33:29.948298"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:33:29.948298"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:33:29.957537"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:33:29.948298"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:33:29.948298"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:33:29.957537"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:33:29.978037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (213.6ms) DROP TABLE "billing_accounts"  (167.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.2ms) select sqlite_version(*)  (163.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (146.7ms) DROP TABLE "billing_charges"  (165.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (157.4ms) DROP TABLE "billing_departments"  (156.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.4ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_origins"  (181.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.3ms) DROP TABLE "billing_payment_types"  (172.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.2ms) DROP TABLE "billing_payments"  (174.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255))  (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (155.2ms) DROP TABLE "billing_plus"  (156.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (180.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.4ms) DROP TABLE "billing_profiles"  (156.3ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.5ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:37:07', '2014-07-25 12:37:07', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:37:07', '2014-07-25 12:37:07', 980190962)  (183.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:37:07.634805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:37:07.655163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:37:07.663442"], ["price_cents", 300], ["updated_at", "2014-07-25 12:37:07.663442"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:37:07.674304"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:37:07.663442"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:37:07.663442"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:37:07.674304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:37:07.695755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:37:07.709626"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:37:07.709626"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:37:07.720259"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:37:07.709626"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:37:07.709626"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:37:07.720259"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:37:07.748924"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:37:07.775802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:37:07.785997"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:37:07.785997"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:37:07.795922"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:37:07.785997"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:37:07.785997"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:37:07.795922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:37:07.817326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (10.0ms) Completed 200 OK in 28ms (Views: 24.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (163.9ms) DROP TABLE "billing_accounts"  (159.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.3ms) select sqlite_version(*)  (163.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.8ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (138.7ms) DROP TABLE "billing_charges"  (156.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (157.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (163.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (172.1ms) DROP TABLE "billing_departments"  (172.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.1ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.6ms) DROP TABLE "billing_origins"  (180.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.6ms) DROP TABLE "billing_payment_types"  (174.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255))  (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (147.1ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (130.8ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (155.7ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:39:03', '2014-07-25 12:39:03', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:39:03', '2014-07-25 12:39:03', 980190962)  (193.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.6ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (29.5ms) Completed 200 OK in 65ms (Views: 50.5ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 12ms (Views: 5.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:39:03.971896"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:39:03.971896"], ["value_cents", 100]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.001952"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:39:04.036751"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:39:04.036751"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.041823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.099369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.113798"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:39:04.120182"], ["price_cents", 300], ["updated_at", "2014-07-25 12:39:04.120182"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:39:04.128639"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:39:04.120182"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:39:04.120182"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:39:04.128639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.149797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:39:04.162955"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:39:04.162955"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:39:04.173390"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:39:04.162955"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:39:04.162955"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:39:04.173390"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.193844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:39:04.207610"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:39:04.207610"], ["value_cents", 400]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:39:04.215040"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:39:04.207610"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:39:04.207610"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:39:04.215040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.233698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:39:04.242765"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:39:04.242765"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:39:04.253998"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:39:04.242765"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:39:04.242765"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:39:04.253998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:39:04.275322"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (184.6ms) DROP TABLE "billing_accounts"  (157.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer)  (0.1ms) select sqlite_version(*)  (164.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (238.3ms) DROP TABLE "billing_charges"  (164.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (171.9ms) DROP TABLE "billing_departments"  (172.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (189.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.5ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (155.4ms) DROP TABLE "billing_origins"  (180.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (147.0ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.3ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255))  (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (138.9ms) DROP TABLE "billing_plus"  (155.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (140.4ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.4ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (147.5ms) DROP TABLE "profiles"  (148.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374, 980190962, 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374, 'Profile', 980190962) Fixture Delete (0.0ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-25 12:59:21', '2014-07-25 12:59:21', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-25 12:59:21', '2014-07-25 12:59:21', 980190962)  (177.8ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.7ms) Completed 200 OK in 57ms (Views: 38.8ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.051777"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.066494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:59:22.072941"], ["price_cents", 300], ["updated_at", "2014-07-25 12:59:22.072941"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:59:22.081223"]] SQL (0.1ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:59:22.072941"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-25 12:59:22.072941"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-25 12:59:22.081223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.101144"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:59:22.110749"], ["fixed_value_cents", -100], ["updated_at", "2014-07-25 12:59:22.110749"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:59:22.120768"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:59:22.110749"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-25 12:59:22.110749"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-25 12:59:22.120768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.141253"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:59:22.153570"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:59:22.153570"], ["value_cents", 400]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:59:22.161530"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-25 12:59:22.153570"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:59:22.153570"], ["value_cents", 400]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-25 12:59:22.161530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.180482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:59:22.189225"], ["fixed_value_cents", 100], ["updated_at", "2014-07-25 12:59:22.189225"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:59:22.198278"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-25 12:59:22.189225"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-25 12:59:22.189225"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-25 12:59:22.198278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.219500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:59:22.264156"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:59:22.264156"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.268689"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (5.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-25 12:59:22.304668"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-25 12:59:22.304668"], ["value_cents", 100]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-25 12:59:22.309108"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (180.4ms) DROP TABLE "billing_accounts"  (159.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer)  (0.3ms) select sqlite_version(*)  (163.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (163.3ms) DROP TABLE "billing_charges"  (172.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (172.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (164.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (153.7ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (152.8ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (152.2ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (162.8ms) CREATE TABLE "billing_closures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))   (147.8ms) CREATE INDEX "index_billing_closures_on_origin_id" ON "billing_closures" ("origin_id")  (172.3ms) DROP TABLE "billing_departments"  (189.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.3ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (155.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (197.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (172.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (132.3ms) DROP TABLE "billing_operators"  (197.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (147.6ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (147.1ms) DROP TABLE "billing_origins"  (189.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.4ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.1ms) DROP TABLE "billing_payment_types"  (189.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.3ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (155.3ms) DROP TABLE "billing_payments"  (180.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "closure_id" integer, "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (148.3ms) CREATE INDEX "index_billing_payments_on_closure_id" ON "billing_payments" ("closure_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_closure_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_closure_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  (146.0ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (146.5ms) DROP TABLE "billing_plus"  (189.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (156.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (147.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.4ms) DROP TABLE "billing_profiles"  (197.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.5ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (147.9ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (146.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.9ms) DROP TABLE "billing_tax_groups"  (182.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (171.8ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.5ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (130.9ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.3ms) SELECT version FROM "schema_migrations"  (146.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725164847')  (140.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725142525')  (132.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725151522')  (140.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725152125')  (362.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725145953')  (123.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725143734')  (132.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725145640')  (131.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725153658')  (133.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725150329')  (131.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140725153215') ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (159.8ms) DROP TABLE "billing_accounts"  (163.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer)  (164.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.7ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (171.3ms) DROP TABLE "billing_charges"  (164.3ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)  (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (178.6ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (169.9ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (173.2ms) DROP TABLE "billing_closures"  (172.3ms) CREATE TABLE "billing_closures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))   (155.9ms) CREATE INDEX "index_billing_closures_on_origin_id" ON "billing_closures" ("origin_id")  (163.6ms) DROP TABLE "billing_departments"  (156.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (154.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.3ms) DROP TABLE "billing_modifiers"  (164.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (164.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.9ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (189.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (181.4ms) DROP TABLE "billing_origins"  (164.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.7ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.6ms) DROP TABLE "billing_payment_types"  (181.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.4ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (179.9ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "closure_id" integer, "deleted_at" datetime)   (205.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_payments_on_closure_id" ON "billing_payments" ("closure_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_closure_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_closure_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  (162.8ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.6ms) DROP TABLE "billing_plus"  (174.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.3ms) DROP TABLE "billing_profiles"  (181.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.9ms) DROP TABLE "billing_pt_fp_mappings"  (172.8ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)  (164.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'  (163.3ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.7ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.8ms) DROP TABLE "billing_versions"  (180.9ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (165.5ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 09:57:24', '2014-07-26 09:57:24', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-26 09:57:24', '2014-07-26 09:57:24', 980190962)  (220.0ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.6ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (8.1ms) Completed 200 OK in 29ms (Views: 23.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 09:57:25.508342"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 09:57:25.523711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 09:57:25.531320"], ["price_cents", 300], ["updated_at", "2014-07-26 09:57:25.531320"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 09:57:25.540165"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 09:57:25.549675"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-26 09:57:25.531320"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-26 09:57:25.531320"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 09:57:25.553931"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 09:57:25.549675"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 09:57:25.574438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 09:57:25.584055"], ["fixed_value_cents", -100], ["updated_at", "2014-07-26 09:57:25.584055"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 09:57:25.586568"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 09:57:25.597185"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 09:57:25.584055"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-26 09:57:25.584055"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 09:57:25.600145"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 09:57:25.597185"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 09:57:25.646411"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 09:57:25.669501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 09:57:25.678494"], ["fixed_value_cents", 100], ["updated_at", "2014-07-26 09:57:25.678494"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 09:57:25.680135"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 09:57:25.689860"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 09:57:25.678494"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-26 09:57:25.678494"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 09:57:25.692565"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 09:57:25.689860"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 09:57:25.712515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (201.0ms) DROP TABLE "billing_accounts"  (213.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer)  (0.2ms) select sqlite_version(*)  (164.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.2ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (188.3ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (179.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (186.8ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.9ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (185.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (163.5ms) DROP TABLE "billing_closures"  (173.5ms) CREATE TABLE "billing_closures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (163.9ms) CREATE INDEX "index_billing_closures_on_origin_id" ON "billing_closures" ("origin_id")  (171.9ms) DROP TABLE "billing_departments"  (172.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (180.7ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'   (163.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.6ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (213.3ms) DROP TABLE "billing_operators"  (172.7ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.6ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (172.9ms) DROP TABLE "billing_origins"  (166.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')  (156.0ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'  (155.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)   (156.1ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (179.9ms) DROP TABLE "billing_payments"  (164.3ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "closure_id" integer, "deleted_at" datetime)  (164.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  (171.2ms) CREATE INDEX "index_billing_payments_on_closure_id" ON "billing_payments" ("closure_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_closure_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_closure_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (170.6ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (171.6ms) DROP TABLE "billing_plus"  (172.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (157.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.6ms) DROP TABLE "billing_profiles"  (172.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (172.2ms) DROP TABLE "billing_pt_fp_mappings"  (181.1ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (172.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.0ms) DROP TABLE "billing_versions"  (172.8ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))  (164.1ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (147.6ms) DROP TABLE "profiles"  (157.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:00:23', '2014-07-26 10:00:23', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-26 10:00:23', '2014-07-26 10:00:23', 980190962)  (208.8ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.5ms) Completed 200 OK in 51ms (Views: 34.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 27ms (Views: 20.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:00:24.422970"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:00:24.438451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 10:00:24.445986"], ["price_cents", 300], ["updated_at", "2014-07-26 10:00:24.445986"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:00:24.454812"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 10:00:24.464496"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-26 10:00:24.445986"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-26 10:00:24.445986"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:00:24.468410"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 10:00:24.464496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:00:24.488750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:00:24.502052"], ["fixed_value_cents", -100], ["updated_at", "2014-07-26 10:00:24.502052"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:00:24.504562"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 10:00:24.515836"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:00:24.502052"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-26 10:00:24.502052"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:00:24.518982"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 10:00:24.515836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:00:24.538848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:00:24.560678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:00:24.571151"], ["fixed_value_cents", 100], ["updated_at", "2014-07-26 10:00:24.571151"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:00:24.572805"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 10:00:24.583276"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:00:24.571151"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-26 10:00:24.571151"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:00:24.586192"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 10:00:24.583276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:00:24.606921"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (204.2ms) DROP TABLE "billing_accounts"  (175.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer)  (0.3ms) select sqlite_version(*)  (163.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.7ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (190.0ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (164.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (170.5ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.9ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.3ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (172.5ms) DROP TABLE "billing_closures"  (164.8ms) CREATE TABLE "billing_closures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.5ms) CREATE INDEX "index_billing_closures_on_origin_id" ON "billing_closures" ("origin_id")  (163.8ms) DROP TABLE "billing_departments"  (173.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'   (164.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.9ms) DROP TABLE "billing_modifiers"  (164.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (147.9ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (171.7ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')  (155.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'  (171.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (172.1ms) DROP TABLE "billing_payment_types"  (189.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)   (164.0ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (173.4ms) DROP TABLE "billing_payments"  (164.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "closure_id" integer, "deleted_at" datetime)  (180.5ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  (147.2ms) CREATE INDEX "index_billing_payments_on_closure_id" ON "billing_payments" ("closure_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_closure_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_closure_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (162.4ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.4ms) DROP TABLE "billing_plus"  (164.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.1ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (171.8ms) DROP TABLE "billing_pt_fp_mappings"  (164.6ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (172.4ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (156.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (180.3ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (163.7ms) DROP TABLE "billing_versions"  (181.0ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))  (155.9ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (147.2ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:02:28', '2014-07-26 10:02:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-26 10:02:28', '2014-07-26 10:02:28', 980190962)  (377.7ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (20.0ms) Completed 200 OK in 54ms (Views: 40.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:02:28.828138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:02:28.851409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 10:02:28.865085"], ["price_cents", 300], ["updated_at", "2014-07-26 10:02:28.865085"], ["value_cents", 300]] SQL (0.3ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:02:28.880260"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 10:02:28.897527"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-26 10:02:28.865085"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-26 10:02:28.865085"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:02:28.903369"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 10:02:28.897527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:02:28.934628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:02:28.947773"], ["fixed_value_cents", -100], ["updated_at", "2014-07-26 10:02:28.947773"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:02:28.950273"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 10:02:28.960360"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:02:28.947773"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-26 10:02:28.947773"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:02:28.963632"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 10:02:28.960360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:02:28.984609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:02:29.007025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:02:29.016063"], ["fixed_value_cents", 100], ["updated_at", "2014-07-26 10:02:29.016063"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:02:29.017880"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 10:02:29.028743"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:02:29.016063"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-26 10:02:29.016063"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:02:29.031602"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 10:02:29.028743"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:02:29.077711"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" IS NULL LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 4.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (172.2ms) DROP TABLE "billing_accounts"  (175.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.8ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (188.4ms) DROP TABLE "billing_charges"  (156.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (186.8ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (160.9ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (179.5ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (171.6ms) DROP TABLE "billing_closures"  (172.1ms) CREATE TABLE "billing_closures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.8ms) CREATE INDEX "index_billing_closures_on_origin_id" ON "billing_closures" ("origin_id")  (171.8ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (156.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'   (163.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (147.3ms) DROP TABLE "billing_modifiers"  (148.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (149.5ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (188.3ms) DROP TABLE "billing_operators"  (181.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (171.7ms) DROP TABLE "billing_origins"  (164.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')  (164.1ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'  (155.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)   (172.5ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (180.0ms) DROP TABLE "billing_payments"  (180.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "closure_id" integer, "deleted_at" datetime)  (165.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_payments_on_closure_id" ON "billing_payments" ("closure_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_closure_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_closure_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.3ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.6ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (163.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (163.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.7ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (188.4ms) DROP TABLE "billing_pt_fp_mappings"  (189.4ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (165.1ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (172.1ms) DROP TABLE "billing_versions"  (164.4ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))  (156.1ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (147.2ms) DROP TABLE "profiles"  (164.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-26 10:07:53', '2014-07-26 10:07:53', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-26 10:07:53', '2014-07-26 10:07:53', 980190962)  (206.3ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (20.4ms) Completed 200 OK in 55ms (Views: 41.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 6.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.258391"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.274131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 10:07:54.281496"], ["price_cents", 300], ["updated_at", "2014-07-26 10:07:54.281496"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.289976"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 10:07:54.299822"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-26 10:07:54.281496"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-26 10:07:54.281496"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.303565"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-26 10:07:54.299822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.324190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:07:54.337679"], ["fixed_value_cents", -100], ["updated_at", "2014-07-26 10:07:54.337679"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.340256"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 10:07:54.351631"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:07:54.337679"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-26 10:07:54.337679"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.354880"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-26 10:07:54.351631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.375998"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 10:07:54.384288"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-26 10:07:54.384288"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.386875"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-26 10:07:54.394771"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-26 10:07:54.384288"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-26 10:07:54.384288"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.398470"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \nclosure_id: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-26 10:07:54.394771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.418283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:07:54.427938"], ["fixed_value_cents", 100], ["updated_at", "2014-07-26 10:07:54.427938"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.429482"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 10:07:54.439703"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-26 10:07:54.427938"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-26 10:07:54.427938"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.442433"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-26 10:07:54.439703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.463543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.8ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 10:07:54.586818"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-26 10:07:54.586818"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.588620"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.593345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-26 10:07:54.622729"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-26 10:07:54.622729"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-26 10:07:54.624772"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-26 10:07:54.630004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (64.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (184.8ms) DROP TABLE "billing_accounts"  (159.2ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer)  (0.3ms) select sqlite_version(*)  (179.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.0ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (170.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.5ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (171.6ms) DROP TABLE "billing_charges"  (147.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (148.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (195.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.3ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (186.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (197.3ms) DROP TABLE "billing_departments"  (197.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (189.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (180.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.3ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (149.0ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.8ms) DROP TABLE "billing_operators"  (172.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.5ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (213.1ms) DROP TABLE "billing_origins"  (172.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.7ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (179.9ms) DROP TABLE "billing_payment_types"  (189.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.2ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.5ms) DROP TABLE "billing_payments"  (164.4ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (156.3ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.6ms) DROP TABLE "billing_plus"  (155.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (262.4ms) DROP TABLE "billing_profiles"  (181.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (188.7ms) DROP TABLE "billing_pt_fp_mappings"  (189.3ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (180.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (171.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (170.7ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))   (147.7ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (173.1ms) DROP TABLE "billing_tax_groups"  (172.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (163.6ms) DROP TABLE "billing_versions"  (172.6ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))  (172.2ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (180.4ms) DROP TABLE "profiles"  (181.2ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.5ms) SELECT version FROM "schema_migrations"  (137.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20140726170002')  (140.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140726163220')  (132.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140726165718') ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (248.6ms) DROP TABLE "billing_accounts"  (168.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (171.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.3ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (161.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.5ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (204.5ms) DROP TABLE "billing_charges"  (188.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (148.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (170.3ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.4ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.5ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (197.2ms) DROP TABLE "billing_departments"  (198.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.4ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (155.0ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.8ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (179.8ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.0ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (179.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (188.5ms) DROP TABLE "billing_payment_types"  (174.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (155.9ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.6ms) DROP TABLE "billing_payments"  (155.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (179.9ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (146.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (172.1ms) DROP TABLE "billing_profiles"  (181.1ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (188.3ms) DROP TABLE "billing_pt_fp_mappings"  (181.0ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (165.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (171.5ms) DROP TABLE "billing_reports"  (164.1ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.9ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (171.7ms) DROP TABLE "billing_tax_groups"  (180.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (171.9ms) DROP TABLE "billing_versions"  (156.2ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (188.8ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (188.0ms) DROP TABLE "profiles"  (181.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (137.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140728110230') ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (182.2ms) DROP TABLE "billing_accounts"  (163.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)   (155.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.2ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.8ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (188.3ms) DROP TABLE "billing_charges"  (164.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (172.4ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (194.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (178.3ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (193.7ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (196.4ms) DROP TABLE "billing_departments"  (174.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.5ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (180.0ms) DROP TABLE "billing_modifiers"  (181.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (180.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.1ms) DROP TABLE "billing_operators"  (164.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (188.9ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (188.2ms) DROP TABLE "billing_origins"  (172.7ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.8ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (204.5ms) DROP TABLE "billing_payment_types"  (174.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.4ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (179.9ms) DROP TABLE "billing_payments"  (180.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (172.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (171.3ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (188.4ms) DROP TABLE "billing_plus"  (172.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (188.4ms) DROP TABLE "billing_profiles"  (173.0ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (179.9ms) DROP TABLE "billing_pt_fp_mappings"  (182.6ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (156.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (171.3ms) DROP TABLE "billing_reports"  (189.3ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.1ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (188.5ms) DROP TABLE "billing_tax_groups"  (189.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (188.4ms) DROP TABLE "billing_versions"  (180.9ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.2ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (172.0ms) DROP TABLE "profiles"  (164.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:08:44', '2014-07-28 11:08:44', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:08:44', '2014-07-28 11:08:44', 980190962)  (242.3ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (51.1ms) Completed 200 OK in 150ms (Views: 133.4ms | ActiveRecord: 1.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 31ms (Views: 28.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 19ms (Views: 16.1ms | ActiveRecord: 1.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 35ms (Views: 31.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:08:45.117496"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:08:45.117496"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:08:45.126888"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:08:45.169875"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:08:45.169875"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:08:45.171668"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types"  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 17ms (Views: 15.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (248.3ms) DROP TABLE "billing_accounts"  (183.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (180.4ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (161.6ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.7ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (157.3ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (170.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.5ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.4ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (196.7ms) DROP TABLE "billing_departments"  (189.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (189.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (187.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (147.3ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.1ms) DROP TABLE "billing_operators"  (165.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.3ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (172.6ms) DROP TABLE "billing_origins"  (173.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (180.7ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (179.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (180.2ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.3ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (180.3ms) DROP TABLE "billing_payments"  (172.5ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (238.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (164.8ms) DROP TABLE "billing_plus"  (238.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (172.3ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.6ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (171.9ms) DROP TABLE "billing_pt_fp_mappings"  (156.3ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.3ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (171.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.5ms) DROP TABLE "billing_reports"  (172.3ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.2ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (173.0ms) DROP TABLE "billing_tax_groups"  (172.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (171.9ms) DROP TABLE "billing_versions"  (180.9ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.9ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:09:28', '2014-07-28 11:09:28', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:09:28', '2014-07-28 11:09:28', 980190962)  (213.7ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.383145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.403297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:09:28.412565"], ["price_cents", 300], ["updated_at", "2014-07-28 11:09:28.412565"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.423230"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:09:28.444475"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:09:28.412565"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:09:28.412565"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.449392"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:09:28.444475"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.470500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:09:28.484494"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:09:28.484494"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.487095"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:09:28.497881"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:09:28.484494"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:09:28.484494"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.501950"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:09:28.497881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.525084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.545124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:09:28.554656"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:09:28.554656"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.556212"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:09:28.567406"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:09:28.554656"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:09:28.554656"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.570931"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:09:28.567406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.592844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (10.2ms) Completed 200 OK in 31ms (Views: 25.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:09:28.738679"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:09:28.738679"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.741474"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.747038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:09:28.775437"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:09:28.775437"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:09:28.777301"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:09:28.781845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (215.2ms) DROP TABLE "billing_accounts"  (150.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (163.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.1ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (147.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.4ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (171.7ms) DROP TABLE "billing_charges"  (155.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.5ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.2ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (177.2ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.1ms) DROP TABLE "billing_departments"  (156.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.5ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (154.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.8ms) DROP TABLE "billing_modifiers"  (157.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.1ms) DROP TABLE "billing_operators"  (271.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.4ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.0ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.5ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (180.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (188.3ms) DROP TABLE "billing_payment_types"  (181.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.3ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.6ms) DROP TABLE "billing_payments"  (157.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (163.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.5ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.5ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (164.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.4ms) DROP TABLE "billing_reports"  (157.0ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.8ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (146.9ms) DROP TABLE "billing_tax_groups"  (156.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (180.1ms) DROP TABLE "billing_versions"  (255.1ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (172.3ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (172.0ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:24:05', '2014-07-28 11:24:05', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:24:05', '2014-07-28 11:24:05', 980190962)  (211.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (9.0ms) Completed 200 OK in 31ms (Views: 24.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.486583"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.503491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:24:05.511412"], ["price_cents", 300], ["updated_at", "2014-07-28 11:24:05.511412"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.520727"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:24:05.530461"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:24:05.511412"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:24:05.511412"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.534104"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:24:05.530461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.556075"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:24:05.565947"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:24:05.565947"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.568741"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:24:05.579909"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:24:05.565947"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:24:05.565947"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.582943"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:24:05.579909"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.605124"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.625670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:24:05.636008"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:24:05.636008"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.637658"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:24:05.648100"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:24:05.636008"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:24:05.636008"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.651052"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:24:05.648100"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.680882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:24:05.751779"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:24:05.751779"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.754755"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.759741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:24:05.790426"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:24:05.790426"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:24:05.792221"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:24:05.796949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (316.8ms) DROP TABLE "billing_accounts"  (150.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (148.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (245.8ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (186.1ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.9ms) DROP TABLE "billing_charges"  (156.1ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (180.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.4ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.4ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.6ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (167.3ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (171.1ms) DROP TABLE "billing_departments"  (156.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (166.4ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.8ms) DROP TABLE "billing_modifiers"  (156.2ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.2ms) DROP TABLE "billing_origins"  (156.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (172.4ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.7ms) DROP TABLE "billing_payment_types"  (181.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (165.6ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.8ms) DROP TABLE "billing_payments"  (156.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (155.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.9ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.3ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (196.7ms) DROP TABLE "billing_pt_fp_mappings"  (189.2ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (165.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (155.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (155.0ms) DROP TABLE "billing_reports"  (155.7ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (156.0ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (163.5ms) DROP TABLE "billing_tax_groups"  (156.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (164.7ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.1ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (164.0ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:28:48', '2014-07-28 11:28:48', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:28:48', '2014-07-28 11:28:48', 980190962)  (207.6ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:48.810604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:48.828465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:28:48.836714"], ["price_cents", 300], ["updated_at", "2014-07-28 11:28:48.836714"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:28:48.847649"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:28:48.857683"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:28:48.836714"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:28:48.836714"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:28:48.861476"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:28:48.857683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:48.882084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:28:48.896537"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:28:48.896537"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:28:48.899576"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:28:48.910379"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:28:48.896537"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:28:48.896537"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:28:48.913505"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:28:48.910379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:48.934242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:48.954717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:28:48.963978"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:28:48.963978"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:28:48.965504"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:28:48.975770"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:28:48.963978"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:28:48.963978"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:28:48.978541"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:28:48.975770"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:48.999858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:28:49.046204"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:28:49.046204"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:28:49.049135"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:49.054254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:28:49.090882"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:28:49.090882"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:28:49.092652"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:28:49.097379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (7.8ms) Completed 200 OK in 29ms (Views: 23.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (566.4ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (377.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.7ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (163.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (187.0ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (180.2ms) DROP TABLE "billing_charges"  (238.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (155.6ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.7ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (172.2ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (180.7ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.5ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.0ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (157.3ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (187.9ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.9ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (163.9ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (172.2ms) DROP TABLE "billing_payments"  (156.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.6ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.0ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.5ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (139.1ms) DROP TABLE "billing_profiles"  (157.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (164.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.3ms) DROP TABLE "billing_reports"  (164.1ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (156.0ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.6ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (164.3ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (156.0ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.4ms) DROP TABLE "profiles"  (174.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:29:14', '2014-07-28 11:29:14', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:29:14', '2014-07-28 11:29:14', 980190962)  (231.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.6ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (18.3ms) Completed 200 OK in 52ms (Views: 38.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:29:14.937800"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:29:14.937800"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:29:14.946862"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:14.952328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:29:14.983969"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:29:14.983969"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:29:14.985785"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:14.990599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:15.024756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:15.041067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:29:15.048847"], ["price_cents", 300], ["updated_at", "2014-07-28 11:29:15.048847"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:29:15.051651"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:29:15.060778"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:29:15.048847"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:29:15.048847"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:29:15.064542"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:29:15.060778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:15.085839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:29:15.122913"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:29:15.122913"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:29:15.125533"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:29:15.136703"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:29:15.122913"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:29:15.122913"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:29:15.139974"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:29:15.136703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:15.163128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:15.182890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:29:15.192532"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:29:15.192532"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:29:15.194095"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:29:15.204474"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:29:15.192532"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:29:15.192532"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:29:15.208048"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:29:15.204474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:29:15.230016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (226.9ms) DROP TABLE "billing_accounts"  (152.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (147.0ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.6ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (163.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (185.9ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (196.4ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.0ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (176.8ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.0ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (157.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.2ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (146.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.6ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.6ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.4ms) DROP TABLE "billing_payments"  (156.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (157.4ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (147.8ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (171.9ms) DROP TABLE "billing_plus"  (172.5ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (138.5ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.5ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (164.5ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (155.2ms) DROP TABLE "billing_reports"  (155.9ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (157.2ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.3ms) DROP TABLE "billing_tax_groups"  (180.8ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (180.2ms) DROP TABLE "billing_versions"  (148.1ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.8ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.6ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:30:30', '2014-07-28 11:30:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:30:30', '2014-07-28 11:30:30', 980190962)  (212.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (33.8ms) Completed 200 OK in 68ms (Views: 54.1ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.690619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.706846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.728301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:30:30.736346"], ["price_cents", 300], ["updated_at", "2014-07-28 11:30:30.736346"], ["value_cents", 300]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.746015"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:30:30.756014"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:30:30.736346"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:30:30.736346"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.759932"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:30:30.756014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.781109"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:30:30.797426"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:30:30.797426"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.799969"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:30:30.810835"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:30:30.797426"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:30:30.797426"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.813913"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:30:30.810835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.834609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.857447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:30:30.867466"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:30:30.867466"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.869004"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:30:30.879105"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:30:30.867466"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:30:30.867466"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.882166"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:30:30.879105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.930974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:30:30.978711"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:30:30.978711"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:30:30.981490"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:30.986255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:30:31.014635"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:30:31.014635"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:30:31.016378"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:30:31.021069"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (206.8ms) DROP TABLE "billing_accounts"  (187.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.4ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (196.3ms) DROP TABLE "billing_charges"  (131.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.2ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.2ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (176.8ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (278.8ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (165.4ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (156.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (131.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.0ms) DROP TABLE "billing_origins"  (156.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.5ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (165.7ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (188.4ms) DROP TABLE "billing_payments"  (147.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (139.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (130.0ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.5ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (179.8ms) DROP TABLE "billing_pt_fp_mappings"  (165.0ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (163.8ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (165.7ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (147.9ms) DROP TABLE "billing_reports"  (148.1ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (139.4ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.0ms) DROP TABLE "billing_tax_groups"  (164.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.4ms) DROP TABLE "billing_versions"  (164.5ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.0ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.2ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:32:45', '2014-07-28 11:32:45', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:32:45', '2014-07-28 11:32:45', 980190962)  (223.7ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.0ms) Completed 200 OK in 53ms (Views: 35.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 7.6ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 12.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:32:45.698255"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:32:45.698255"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.708269"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.713913"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:32:45.744515"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:32:45.744515"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.746285"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.751072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.792979"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.807466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.829126"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:32:45.837396"], ["price_cents", 300], ["updated_at", "2014-07-28 11:32:45.837396"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.840223"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:32:45.849706"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:32:45.837396"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:32:45.837396"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.853389"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:32:45.849706"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.901746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:32:45.912038"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:32:45.912038"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.914638"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:32:45.925650"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:32:45.912038"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:32:45.912038"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.928642"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:32:45.925650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.952363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:45.973737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:32:45.983402"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:32:45.983402"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.984929"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:32:45.994775"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:32:45.983402"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:32:45.983402"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:32:45.997643"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:32:45.994775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:32:46.022685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.9ms) DROP TABLE "billing_accounts"  (159.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (154.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (155.3ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (236.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (187.9ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.8ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (178.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (304.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.6ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (169.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.1ms) DROP TABLE "billing_departments"  (156.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.1ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (171.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (171.3ms) DROP TABLE "billing_modifiers"  (148.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (158.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.7ms) DROP TABLE "billing_operators"  (181.2ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (171.8ms) DROP TABLE "billing_origins"  (156.5ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.7ms) DROP TABLE "billing_payment_types"  (156.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (180.7ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.4ms) DROP TABLE "billing_payments"  (172.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (149.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.6ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.6ms) DROP TABLE "billing_plus"  (180.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.4ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (171.8ms) DROP TABLE "billing_pt_fp_mappings"  (172.9ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (180.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (179.7ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (146.9ms) DROP TABLE "billing_reports"  (164.0ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (165.6ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.3ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (155.4ms) DROP TABLE "billing_versions"  (164.4ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.9ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.4ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.2ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:38:27', '2014-07-28 11:38:27', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:38:27', '2014-07-28 11:38:27', 980190962)  (212.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.6ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (34.0ms) Completed 200 OK in 70ms (Views: 55.7ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:38:27.921718"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:38:27.921718"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:38:27.930751"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:27.936183"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:38:27.966362"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:38:27.966362"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:38:27.968168"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:27.972854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.041710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.057412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.075691"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:38:28.083268"], ["price_cents", 300], ["updated_at", "2014-07-28 11:38:28.083268"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.085992"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:38:28.095882"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:38:28.083268"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:38:28.083268"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.100552"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:38:28.095882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.123318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:38:28.137470"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:38:28.137470"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.140095"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:38:28.150771"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:38:28.137470"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:38:28.137470"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.153938"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:38:28.150771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.205024"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:38:28.213852"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:38:28.213852"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.215764"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:38:28.226281"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:38:28.213852"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:38:28.213852"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.230196"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:38:28.226281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.249944"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:38:28.259735"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:38:28.259735"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.261320"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:38:28.271282"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:38:28.259735"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:38:28.259735"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:38:28.274107"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:38:28.271282"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:38:28.298269"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (207.7ms) DROP TABLE "billing_accounts"  (150.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.8ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (153.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (153.0ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (171.8ms) DROP TABLE "billing_charges"  (155.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (153.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.0ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (193.3ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (196.5ms) DROP TABLE "billing_departments"  (164.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (147.2ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.0ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (181.3ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.0ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.7ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (155.9ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (155.3ms) DROP TABLE "billing_payments"  (156.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (172.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (163.3ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.4ms) DROP TABLE "billing_plus"  (173.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (157.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.9ms) DROP TABLE "billing_profiles"  (164.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.3ms) DROP TABLE "billing_pt_fp_mappings"  (164.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (155.8ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (180.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (171.8ms) DROP TABLE "billing_reports"  (164.2ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.9ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.2ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (165.7ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.2ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (148.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:40:25', '2014-07-28 11:40:25', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:40:25', '2014-07-28 11:40:25', 980190962)  (211.2ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (33.8ms) Completed 200 OK in 69ms (Views: 54.1ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:40:25.822977"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:40:25.822977"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:40:25.833215"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:25.838721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:40:25.868894"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:40:25.868894"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:40:25.870692"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:25.875464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:25.965211"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:25.979850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:25.992586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:40:26.002817"], ["price_cents", 300], ["updated_at", "2014-07-28 11:40:26.002817"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.005985"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:40:26.015923"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:40:26.002817"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:40:26.002817"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.019634"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:40:26.015923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:26.067236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:40:26.077437"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:40:26.077437"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.079955"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:40:26.090803"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:40:26.077437"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:40:26.077437"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.093981"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:40:26.090803"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:26.117184"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:40:26.125513"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:40:26.125513"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.127353"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:40:26.135614"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:40:26.125513"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:40:26.125513"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.139226"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:40:26.135614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:26.157842"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:40:26.167734"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:40:26.167734"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.170043"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:40:26.180521"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:40:26.167734"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:40:26.167734"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:40:26.183413"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:40:26.180521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:40:26.204185"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (193.6ms) DROP TABLE "billing_accounts"  (151.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (155.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.2ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (170.8ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (188.2ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (137.5ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.2ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (258.8ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.4ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (171.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (172.0ms) DROP TABLE "billing_modifiers"  (156.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (149.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.7ms) DROP TABLE "billing_operators"  (156.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.3ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.3ms) DROP TABLE "billing_origins"  (156.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (179.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (188.2ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.1ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.7ms) DROP TABLE "billing_payments"  (156.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (155.6ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (131.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (188.7ms) DROP TABLE "billing_plus"  (173.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.4ms) DROP TABLE "billing_profiles"  (164.8ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.0ms) DROP TABLE "billing_pt_fp_mappings"  (164.8ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (155.7ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (155.3ms) DROP TABLE "billing_reports"  (157.9ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.1ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (163.7ms) DROP TABLE "billing_tax_groups"  (164.4ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (164.5ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.2ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.6ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:42:02', '2014-07-28 11:42:02', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:42:02', '2014-07-28 11:42:02', 980190962)  (214.4ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.5ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (19.6ms) Completed 200 OK in 54ms (Views: 40.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 17ms (Views: 13.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:42:02.491842"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:42:02.491842"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.501365"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.507044"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:42:02.536858"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:42:02.536858"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.538893"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.544741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.615313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.629870"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.640577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:42:02.648170"], ["price_cents", 300], ["updated_at", "2014-07-28 11:42:02.648170"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.651215"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:42:02.662751"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:42:02.648170"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:42:02.648170"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.666609"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:42:02.662751"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.687267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:42:02.696762"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:42:02.696762"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.699285"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:42:02.710619"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:42:02.696762"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:42:02.696762"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.714871"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:42:02.710619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.762823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:42:02.773223"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:42:02.773223"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.775084"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:42:02.783328"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:42:02.773223"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:42:02.773223"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.787190"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:42:02.783328"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.806599"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:42:02.816192"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:42:02.816192"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.817773"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:42:02.829027"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:42:02.816192"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:42:02.816192"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:42:02.831906"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:42:02.829027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:42:02.852769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (203.2ms) DROP TABLE "billing_accounts"  (151.5ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (147.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.0ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (172.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (186.0ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (188.6ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (153.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.0ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (193.4ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (279.0ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (146.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (147.1ms) DROP TABLE "billing_modifiers"  (149.4ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.7ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (171.8ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (163.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (179.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (188.4ms) DROP TABLE "billing_payment_types"  (156.2ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (147.7ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.6ms) DROP TABLE "billing_payments"  (156.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (157.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (229.1ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (172.0ms) DROP TABLE "billing_plus"  (188.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (164.1ms) DROP TABLE "billing_profiles"  (164.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (164.4ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (172.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.8ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (154.9ms) DROP TABLE "billing_reports"  (149.1ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.8ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.6ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (254.4ms) DROP TABLE "billing_versions"  (164.5ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (180.7ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:11', '2014-07-28 11:48:11', 298486374) Fixture Delete (0.0ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:48:11', '2014-07-28 11:48:11', 980190962)  (217.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (16.3ms) Completed 200 OK in 75ms (Views: 33.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 18ms (Views: 15.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:12.353693"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:12.353693"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.362922"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.368780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:12.398597"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:12.398597"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.400410"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.406379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.479588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.494720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.507133"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:12.523093"], ["price_cents", 300], ["updated_at", "2014-07-28 11:48:12.523093"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.525853"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:48:12.535806"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:48:12.523093"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:48:12.523093"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.539459"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:48:12.535806"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.560486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:12.571476"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:48:12.571476"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.573920"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:48:12.585480"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:12.571476"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:48:12.571476"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.588494"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:48:12.585480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.609709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:12.619429"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:12.619429"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.621231"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:48:12.629606"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:48:12.619429"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:12.619429"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.633627"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:48:12.629606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.653127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:12.662599"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:48:12.662599"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.664161"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:48:12.676118"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:12.662599"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:48:12.662599"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:12.678988"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:48:12.676118"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:12.701040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (224.2ms) DROP TABLE "billing_accounts"  (161.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.8ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (153.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (227.6ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.9ms) DROP TABLE "billing_charges"  (155.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.5ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.4ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (160.4ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (179.3ms) DROP TABLE "billing_departments"  (165.9ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (179.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.0ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.5ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.1ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (155.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.0ms) DROP TABLE "billing_payment_types"  (165.9ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.2ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.4ms) DROP TABLE "billing_payments"  (147.7ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (156.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.4ms) DROP TABLE "billing_plus"  (189.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.7ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.4ms) DROP TABLE "billing_pt_fp_mappings"  (164.6ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (157.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (270.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (164.4ms) DROP TABLE "billing_reports"  (164.4ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (156.3ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (171.7ms) DROP TABLE "billing_tax_groups"  (255.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_versions"  (156.1ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (147.6ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:48:59', '2014-07-28 11:48:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:48:59', '2014-07-28 11:48:59', 980190962)  (218.5ms) commit transaction  (0.2ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:59.428662"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:59.428662"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.439991"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.446505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.2ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:59.489716"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:59.489716"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.491604"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.496683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.533050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.547517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.559172"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:59.566671"], ["price_cents", 300], ["updated_at", "2014-07-28 11:48:59.566671"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.569414"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:48:59.578549"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:48:59.566671"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:48:59.566671"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.583011"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:48:59.578549"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.604063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:59.618141"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:48:59.618141"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.620793"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:48:59.631703"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:59.618141"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:48:59.618141"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.635715"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:48:59.631703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.657099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:48:59.665745"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:59.665745"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.667464"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:48:59.675449"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:48:59.665745"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:48:59.665745"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.679377"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:48:59.675449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.700777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:59.710793"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:48:59.710793"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.712435"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:48:59.722776"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:48:59.710793"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:48:59.710793"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:48:59.725670"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:48:59.722776"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:48:59.773216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.7ms) Completed 200 OK in 28ms (Views: 23.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (241.4ms) DROP TABLE "billing_accounts"  (159.3ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (155.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (145.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (161.6ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (171.8ms) DROP TABLE "billing_charges"  (140.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.2ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.5ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.0ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.4ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (154.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.3ms) DROP TABLE "billing_modifiers"  (139.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (131.2ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.7ms) DROP TABLE "billing_operators"  (165.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.3ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.2ms) DROP TABLE "billing_origins"  (147.9ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (402.2ms) DROP TABLE "billing_payment_types"  (181.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.5ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.3ms) DROP TABLE "billing_payments"  (139.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (163.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (164.5ms) DROP TABLE "billing_plus"  (164.3ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (163.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (172.0ms) DROP TABLE "billing_profiles"  (172.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (196.4ms) DROP TABLE "billing_pt_fp_mappings"  (156.6ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (156.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.5ms) DROP TABLE "billing_reports"  (164.2ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.0ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (156.8ms) DROP TABLE "billing_tax_groups"  (156.2ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (155.2ms) DROP TABLE "billing_versions"  (164.7ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.8ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (172.3ms) DROP TABLE "profiles"  (181.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:51:40', '2014-07-28 11:51:40', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:51:40', '2014-07-28 11:51:40', 980190962)  (198.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.9ms) Completed 200 OK in 79ms (Views: 61.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 27ms (Views: 23.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:51:40.557369"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:51:40.557369"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.566721"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.572331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:51:40.603662"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:51:40.603662"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.605459"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.610378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.698942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.714105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.732881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:51:40.747939"], ["price_cents", 300], ["updated_at", "2014-07-28 11:51:40.747939"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.750824"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:51:40.760607"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:51:40.747939"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:51:40.747939"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.764395"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:51:40.760607"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.784632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:51:40.794303"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:51:40.794303"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.796841"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:51:40.808278"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:51:40.794303"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:51:40.794303"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.811937"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:51:40.808278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.833039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:51:40.841339"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:51:40.841339"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.843022"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:51:40.850805"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:51:40.841339"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:51:40.841339"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.855166"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:51:40.850805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.874529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:51:40.883754"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:51:40.883754"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.885304"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:51:40.894973"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:51:40.883754"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:51:40.883754"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:51:40.897852"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:51:40.894973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:51:40.920039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (246.8ms) DROP TABLE "billing_accounts"  (184.7ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (154.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (152.9ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (163.4ms) DROP TABLE "billing_charges"  (155.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.4ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (176.5ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.2ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (188.3ms) DROP TABLE "billing_origins"  (172.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (190.3ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.1ms) DROP TABLE "billing_payment_types"  (164.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (155.8ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (147.0ms) DROP TABLE "billing_payments"  (148.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (146.6ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.4ms) DROP TABLE "billing_plus"  (189.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (165.1ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.0ms) DROP TABLE "billing_pt_fp_mappings"  (164.5ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (147.3ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (154.9ms) DROP TABLE "billing_reports"  (164.6ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.8ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.4ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (181.0ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.2ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (156.9ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:55:49', '2014-07-28 11:55:49', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:55:49', '2014-07-28 11:55:49', 980190962)  (196.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (17.5ms) Completed 200 OK in 50ms (Views: 36.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:55:49.950599"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:55:49.950599"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:49.960026"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:49.965546"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:55:49.997419"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:55:49.997419"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:49.999237"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.004121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 7.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.128131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.143755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:55:50.152363"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:55:50.152363"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.154194"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:55:50.161934"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:55:50.152363"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:55:50.152363"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.165914"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:55:50.161934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.185530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:55:50.195125"], ["price_cents", 300], ["updated_at", "2014-07-28 11:55:50.195125"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.198020"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:55:50.207665"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:55:50.195125"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:55:50.195125"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.211070"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:55:50.207665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.237426"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:55:50.247984"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:55:50.247984"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.250504"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:55:50.261372"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:55:50.247984"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:55:50.247984"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.264325"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:55:50.261372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.284858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:55:50.293161"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:55:50.293161"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.295027"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:55:50.303541"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:55:50.293161"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:55:50.293161"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.307330"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 11:55:50.303541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.325789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:55:50.335009"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:55:50.335009"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.336583"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:55:50.346081"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:55:50.335009"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:55:50.335009"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:55:50.349141"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:55:50.346081"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:55:50.372042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (514.6ms) DROP TABLE "billing_accounts"  (199.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (155.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (156.5ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (129.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (153.0ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (171.7ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.5ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.7ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.1ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (156.7ms) DROP TABLE "billing_modifiers"  (139.8ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.7ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.7ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (179.9ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.6ms) DROP TABLE "billing_payment_types"  (156.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.1ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.5ms) DROP TABLE "billing_payments"  (141.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (155.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (204.6ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.8ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.8ms) DROP TABLE "billing_profiles"  (222.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_pt_fp_mappings"  (156.2ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (155.9ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (179.9ms) DROP TABLE "billing_reports"  (182.0ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (180.5ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (163.5ms) DROP TABLE "billing_tax_groups"  (164.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.1ms) DROP TABLE "billing_versions"  (164.9ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (163.8ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (156.2ms) DROP TABLE "profiles"  (156.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 11:59:09', '2014-07-28 11:59:09', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 11:59:09', '2014-07-28 11:59:09', 980190962)  (203.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (16.3ms) Completed 200 OK in 75ms (Views: 33.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:59:09.710646"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:59:09.710646"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:09.720178"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:09.725486"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:59:09.754881"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:59:09.754881"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:09.756643"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:09.761404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:09.797031"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:09.811628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:59:09.821123"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:59:09.821123"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:09.822860"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:12.492019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:59:12.500425"], ["price_cents", 300], ["updated_at", "2014-07-28 11:59:12.500425"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:12.503314"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:59:12.512074"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 11:59:12.500425"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 11:59:12.500425"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:59:12.515841"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 11:59:12.512074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:12.535227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:59:12.544409"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 11:59:12.544409"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:12.546790"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:59:12.558248"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:59:12.544409"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 11:59:12.544409"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:59:12.561117"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 11:59:12.558248"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:12.580927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 11:59:12.588776"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 11:59:12.588776"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:12.590427"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:15.045697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:59:15.054699"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 11:59:15.054699"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 11:59:15.056202"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:59:15.065550"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 11:59:15.054699"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 11:59:15.054699"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 11:59:15.068318"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 11:59:15.065550"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.8ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 11:59:15.115898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (200.2ms) DROP TABLE "billing_accounts"  (167.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (145.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.8ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (180.1ms) DROP TABLE "billing_charges"  (147.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (164.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (153.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.4ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.3ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.1ms) DROP TABLE "billing_departments"  (164.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (154.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.6ms) DROP TABLE "billing_modifiers"  (131.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (131.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.8ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (157.3ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.0ms) DROP TABLE "billing_origins"  (164.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.3ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (146.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.4ms) DROP TABLE "billing_payment_types"  (148.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.2ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (525.8ms) DROP TABLE "billing_payments"  (148.0ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (163.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (155.5ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (171.7ms) DROP TABLE "billing_plus"  (183.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (147.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.5ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_pt_fp_mappings"  (156.3ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (171.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.6ms) DROP TABLE "billing_reports"  (163.9ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.9ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.5ms) DROP TABLE "billing_tax_groups"  (157.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (154.6ms) DROP TABLE "billing_versions"  (164.4ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.9ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (156.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:24:41', '2014-07-28 12:24:41', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 12:24:41', '2014-07-28 12:24:41', 980190962)  (214.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.3ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.2ms) Completed 200 OK in 79ms (Views: 62.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.285243"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:24:42.285243"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.294562"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.300125"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.330814"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:24:42.330814"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.332641"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.338406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 11ms (Views: 9.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.394784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.409799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.418501"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:24:42.418501"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.420334"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:24:42.428158"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.418501"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:24:42.418501"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.432244"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:24:42.428158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.452975"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.460751"], ["price_cents", 300], ["updated_at", "2014-07-28 12:24:42.460751"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.463780"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:24:42.473067"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.460751"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 12:24:42.460751"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.476421"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:24:42.473067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.504626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:24:42.518867"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 12:24:42.518867"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.521529"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:24:42.532473"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:24:42.518867"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 12:24:42.518867"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.535531"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:24:42.532473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.557332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.566410"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:24:42.566410"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.568210"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:24:42.576079"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:24:42.566410"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:24:42.566410"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.579726"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:24:42.576079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.598373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:24:42.607769"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 12:24:42.607769"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.609951"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:24:42.620791"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:24:42.607769"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 12:24:42.607769"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:24:42.623654"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:24:42.620791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:24:42.644414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.9ms) DROP TABLE "billing_accounts"  (151.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (148.6ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (145.6ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (177.7ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (163.4ms) DROP TABLE "billing_charges"  (155.8ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.3ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.5ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.5ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (171.9ms) DROP TABLE "billing_departments"  (148.1ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.3ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (156.3ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.5ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.8ms) DROP TABLE "billing_operators"  (164.5ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (171.9ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (501.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (155.4ms) DROP TABLE "billing_payment_types"  (139.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.3ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (173.1ms) DROP TABLE "billing_payments"  (155.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.7ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.6ms) DROP TABLE "billing_profiles"  (156.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.2ms) DROP TABLE "billing_pt_fp_mappings"  (157.3ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (164.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (164.0ms) DROP TABLE "billing_reports"  (155.8ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.8ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.6ms) DROP TABLE "billing_tax_groups"  (156.0ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.7ms) DROP TABLE "billing_versions"  (147.9ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (156.2ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (139.0ms) DROP TABLE "profiles"  (140.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.2ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:25:37', '2014-07-28 12:25:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 12:25:37', '2014-07-28 12:25:37', 980190962)  (213.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (13.2ms) Completed 200 OK in 53ms (Views: 36.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 28ms (Views: 24.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:37.825290"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:37.840856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:25:37.849537"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:25:37.849537"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.858521"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:25:37.866929"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:25:37.849537"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:25:37.849537"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.871074"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:25:37.866929"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:37.891662"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:25:37.899247"], ["price_cents", 300], ["updated_at", "2014-07-28 12:25:37.899247"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.901979"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:25:37.910850"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:25:37.899247"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 12:25:37.899247"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.914123"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:25:37.910850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:37.935502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:25:37.949697"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 12:25:37.949697"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.952289"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:25:37.963339"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:25:37.949697"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 12:25:37.949697"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.966452"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:25:37.963339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:37.988025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:25:37.996950"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:25:37.996950"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:37.998761"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:25:38.006779"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:25:37.996950"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:25:37.996950"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:25:38.010446"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:25:38.006779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:38.057167"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:25:38.067101"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 12:25:38.067101"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:38.068657"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:25:38.078622"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:25:38.067101"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 12:25:38.067101"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:25:38.081502"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:25:38.078622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:38.104084"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:25:38.175678"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:25:38.175678"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:38.177502"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:38.182066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:25:38.211368"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:25:38.211368"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:25:38.213390"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:25:38.218255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (164.1ms) DROP TABLE "billing_accounts"  (150.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (146.9ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (146.4ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (129.4ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.4ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.9ms) DROP TABLE "billing_charges"  (238.4ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (155.7ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.3ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.5ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (171.6ms) DROP TABLE "billing_departments"  (165.0ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (156.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (172.3ms) DROP TABLE "billing_operators"  (164.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.4ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (181.5ms) DROP TABLE "billing_origins"  (156.3ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.8ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (172.0ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.2ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.7ms) DROP TABLE "billing_payments"  (295.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (155.1ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.7ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.2ms) DROP TABLE "billing_profiles"  (148.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.0ms) DROP TABLE "billing_pt_fp_mappings"  (164.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (155.1ms) DROP TABLE "billing_reports"  (155.7ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.9ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.3ms) DROP TABLE "billing_tax_groups"  (156.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (164.5ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (149.0ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.4ms) DROP TABLE "profiles"  (148.4ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 12:26:29', '2014-07-28 12:26:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 12:26:29', '2014-07-28 12:26:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 12:26:29', '2014-07-28 12:26:29', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 12:26:30', '2014-07-28 12:26:30', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 12:26:30', '2014-07-28 12:26:30', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:30', '2014-07-28 12:26:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:30', '2014-07-28 12:26:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:26:30', '2014-07-28 12:26:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:26:30', '2014-07-28 12:26:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 12:26:30', '2014-07-28 12:26:30', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 12:26:30', '2014-07-28 12:26:30', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:30', '2014-07-28 12:26:30', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:30', '2014-07-28 12:26:30', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 12:26:30', '2014-07-28 12:26:30', 980190962)  (218.0ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.4ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (32.5ms) Completed 200 OK in 65ms (Views: 52.0ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.416421"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:30.416421"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.426169"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.431723"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.463716"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:30.463716"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.465521"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.470418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.503977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.519569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.528026"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:30.528026"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.529744"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:30.537623"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:30.537817"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.528026"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:30.528026"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.541686"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:30.537623"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:30.537817"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.560220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.569541"], ["price_cents", 300], ["updated_at", "2014-07-28 12:26:30.569541"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.572490"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:26:30.581734"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.569541"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 12:26:30.569541"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.585194"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:26:30.581734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.605632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:30.620617"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 12:26:30.620617"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.623299"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:26:30.634040"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:30.620617"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 12:26:30.620617"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.637370"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:26:30.634040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.685952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.695002"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:30.695002"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.696806"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:30.705051"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:30.705190"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:26:30.695002"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:30.695002"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.708859"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:30.705051"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:30.705190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.728759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:30.739330"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 12:26:30.739330"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.740923"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:26:30.750835"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:30.739330"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 12:26:30.739330"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:30.753660"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:26:30.750835"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:30.773786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.8ms) DROP TABLE "billing_accounts"  (150.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (147.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (146.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.6ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (197.9ms) DROP TABLE "billing_charges"  (180.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (147.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (245.5ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (153.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.2ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (168.4ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.2ms) DROP TABLE "billing_departments"  (164.4ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (156.1ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (157.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.6ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (163.9ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.2ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (171.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.0ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (171.7ms) DROP TABLE "billing_payments"  (156.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (140.1ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (155.2ms) DROP TABLE "billing_plus"  (164.2ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (271.6ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (162.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (155.6ms) DROP TABLE "billing_profiles"  (164.2ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (164.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.5ms) DROP TABLE "billing_reports"  (155.7ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.8ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (156.9ms) DROP TABLE "billing_tax_groups"  (164.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.6ms) DROP TABLE "billing_versions"  (164.4ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (163.9ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (147.1ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 12:26:59', '2014-07-28 12:26:59', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 12:26:59', '2014-07-28 12:26:59', 980190962)  (198.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.6ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/payments/new.html.erb within layouts/billing/application (16.8ms) Completed 200 OK in 42ms (Views: 31.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.7ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 6.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.725349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.740329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:59.748882"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:59.748882"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.758855"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:59.767753"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:59.767922"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:26:59.748882"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:59.748882"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.772074"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:59.767753"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:59.767922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.791093"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:59.798645"], ["price_cents", 300], ["updated_at", "2014-07-28 12:26:59.798645"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.801407"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:26:59.810892"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:26:59.798645"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 12:26:59.798645"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.815572"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 12:26:59.810892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.836716"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:59.846738"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 12:26:59.846738"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.856180"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:26:59.867356"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:59.846738"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 12:26:59.846738"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.870725"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 12:26:59.867356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.891671"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:26:59.899975"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:59.899975"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.901728"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:59.909019"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:59.909140"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 12:26:59.899975"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:26:59.899975"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.912480"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 12:26:59.909019"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 12:26:59.909140"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.932076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:59.941402"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 12:26:59.941402"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.943154"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:26:59.952846"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 12:26:59.941402"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 12:26:59.941402"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 12:26:59.955685"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 12:26:59.952846"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:26:59.976996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:27:00.019125"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:27:00.019125"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:27:00.020916"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:27:00.025727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 12:27:00.055671"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 12:27:00.055671"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 12:27:00.057465"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 12:27:00.062085"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (205.1ms) DROP TABLE "billing_accounts"  (134.6ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (147.2ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.7ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (146.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.5ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (188.1ms) DROP TABLE "billing_charges"  (131.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (131.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (155.6ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.4ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (160.9ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (181.2ms) DROP TABLE "billing_departments"  (156.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.6ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (154.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (156.0ms) DROP TABLE "billing_modifiers"  (148.0ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (131.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (155.3ms) DROP TABLE "billing_operators"  (148.1ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.2ms) DROP TABLE "billing_origins"  (156.8ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.3ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (165.8ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (164.2ms) DROP TABLE "billing_payment_types"  (156.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (163.9ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (164.3ms) DROP TABLE "billing_payments"  (147.8ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (196.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (137.8ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (172.9ms) DROP TABLE "billing_plus"  (164.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (173.6ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.3ms) DROP TABLE "billing_profiles"  (164.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (173.3ms) DROP TABLE "billing_pt_fp_mappings"  (156.2ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.4ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (172.4ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (172.6ms) DROP TABLE "billing_reports"  (164.9ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.7ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (164.1ms) DROP TABLE "billing_tax_groups"  (164.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (172.6ms) DROP TABLE "billing_versions"  (156.2ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.7ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.7ms) DROP TABLE "profiles"  (156.3ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:40:37', '2014-07-28 13:40:37', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 13:40:37', '2014-07-28 13:40:37', 980190962)  (213.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (8.0ms) Completed 500 Internal Server Error in 40ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 500 Internal Server Error in 19ms  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 500 Internal Server Error in 38ms  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 500 Internal Server Error in 17ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 500 Internal Server Error in 15ms  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:40:37.989263"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:40:37.989263"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:37.998168"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.003294"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.036308"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:40:38.036308"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.038032"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.042507"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.078267"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.118653"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.126518"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:40:38.126518"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.128186"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:40:38.136316"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:40:38.136420"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.126518"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:40:38.126518"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.140340"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:40:38.136316"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:40:38.136420"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.158497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.165823"], ["price_cents", 300], ["updated_at", "2014-07-28 13:40:38.165823"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.168394"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 13:40:38.176699"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.165823"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 13:40:38.165823"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.179856"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 13:40:38.176699"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.203693"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:40:38.213001"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 13:40:38.213001"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.215570"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 13:40:38.225803"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:40:38.213001"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 13:40:38.213001"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.228675"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 13:40:38.225803"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.249923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.258059"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:40:38.258059"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.259667"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:40:38.267209"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:40:38.267304"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:40:38.258059"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:40:38.258059"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.270567"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:40:38.267209"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:40:38.267304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.290118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:40:38.299558"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 13:40:38.299558"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.301266"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 13:40:38.310658"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:40:38.299558"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 13:40:38.299558"]] SQL (0.0ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:40:38.313439"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 13:40:38.310658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:40:38.334329"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (198.1ms) DROP TABLE "billing_accounts"  (151.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (146.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (163.0ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (145.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (177.8ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (180.9ms) DROP TABLE "billing_charges"  (156.2ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (156.0ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (236.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (168.6ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (188.2ms) DROP TABLE "billing_departments"  (156.6ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (154.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (164.2ms) DROP TABLE "billing_modifiers"  (148.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (155.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (173.2ms) DROP TABLE "billing_operators"  (164.8ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.6ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (163.5ms) DROP TABLE "billing_origins"  (139.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (352.7ms) DROP TABLE "billing_payment_types"  (164.0ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (173.1ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (172.0ms) DROP TABLE "billing_payments"  (156.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (155.9ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (156.8ms) DROP TABLE "billing_plus"  (147.6ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (139.7ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (147.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (156.0ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (156.2ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (163.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.3ms) DROP TABLE "billing_reports"  (163.9ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.5ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (163.7ms) DROP TABLE "billing_tax_groups"  (149.7ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.7ms) DROP TABLE "billing_versions"  (164.6ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (155.6ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.7ms) DROP TABLE "profiles"  (156.7ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.4ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:20', '2014-07-28 13:42:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 13:42:20', '2014-07-28 13:42:20', 980190962)  (214.0ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SAVEPOINT active_record_1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.162561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.183505"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.222135"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:21.222135"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.232151"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:21.241206"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:21.241304"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.222135"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:21.222135"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.245650"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:21.241206"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:21.241304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.266026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.274390"], ["price_cents", 300], ["updated_at", "2014-07-28 13:42:21.274390"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.277323"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.4ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 13:42:21.286794"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.274390"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 13:42:21.274390"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.292271"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 13:42:21.286794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.315195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:21.329125"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 13:42:21.329125"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.331785"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 13:42:21.342509"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:21.329125"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 13:42:21.329125"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.345581"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 13:42:21.342509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.367289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.375831"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:21.375831"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.377618"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:21.385171"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:21.385252"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.375831"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:21.375831"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.388605"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:21.385171"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:21.385252"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.409447"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:21.419967"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 13:42:21.419967"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.421541"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 13:42:21.431624"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:21.419967"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 13:42:21.419967"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.434435"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 13:42:21.431624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.456089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/charges/new.html.erb within layouts/billing/application (8.6ms) Completed 200 OK in 169ms (Views: 163.3ms | ActiveRecord: 0.6ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.5ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 17ms (Views: 10.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 6.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 10ms (Views: 8.0ms | ActiveRecord: 1.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.775926"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:21.775926"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.778429"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.785139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:21.821862"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:21.821862"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:21.823928"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:21.829367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (1.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (199.4ms) DROP TABLE "billing_accounts"  (150.9ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (148.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (162.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (145.5ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.9ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.9ms) DROP TABLE "billing_charges"  (155.9ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (221.8ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (162.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.0ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.5ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (160.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.1ms) DROP TABLE "billing_departments"  (139.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (139.6ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (156.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.7ms) DROP TABLE "billing_modifiers"  (156.3ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.6ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_operators"  (164.4ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.1ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (171.8ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.4ms) DROP TABLE "billing_payment_types"  (164.4ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.4ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (173.1ms) DROP TABLE "billing_payments"  (155.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.3ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.9ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.3ms) DROP TABLE "billing_plus"  (172.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.9ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (163.7ms) DROP TABLE "billing_pt_fp_mappings"  (156.4ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (165.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (163.3ms) DROP TABLE "billing_reports"  (156.7ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (155.8ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.3ms) DROP TABLE "billing_tax_groups"  (156.5ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.4ms) DROP TABLE "billing_versions"  (164.4ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (156.3ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (170.0ms) DROP TABLE "profiles"  (166.8ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 13:42:46', '2014-07-28 13:42:46', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 13:42:46', '2014-07-28 13:42:46', 980190962)  (212.1ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.6ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (11.9ms) Completed 200 OK in 79ms (Views: 61.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 6.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 15ms (Views: 11.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 10ms (Views: 6.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.164435"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.179903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.188755"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:47.188755"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.197609"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:47.205329"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:47.205418"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.188755"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:47.188755"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.209458"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:47.205329"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:47.205418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.228342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.236085"], ["price_cents", 300], ["updated_at", "2014-07-28 13:42:47.236085"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.238754"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 13:42:47.247772"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.236085"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 13:42:47.236085"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.251052"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 13:42:47.247772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.270800"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:47.285808"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 13:42:47.285808"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.288372"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 13:42:47.299050"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:47.285808"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 13:42:47.285808"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.301950"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 13:42:47.299050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.329977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.338686"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:47.338686"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.340341"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:47.348132"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:47.348227"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.338686"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:47.338686"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.351734"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 13:42:47.348132"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 13:42:47.348227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.370458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:47.380190"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 13:42:47.380190"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.382048"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 13:42:47.392370"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 13:42:47.380190"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 13:42:47.380190"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.395247"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 13:42:47.392370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.416418"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.486292"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:47.486292"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.488370"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.493470"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 13:42:47.522374"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 13:42:47.522374"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 13:42:47.524061"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 13:42:47.528560"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Billing::PaymentType Load (64.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (197.4ms) DROP TABLE "billing_accounts"  (151.0ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.2ms) select sqlite_version(*)  (147.1ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (171.2ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (153.9ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.5ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (180.0ms) DROP TABLE "billing_charges"  (165.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (164.2ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (171.3ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (261.4ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (177.7ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (176.8ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (196.5ms) DROP TABLE "billing_departments"  (172.8ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (172.5ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (163.6ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (172.4ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (140.3ms) DROP TABLE "billing_operators"  (173.0ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (188.6ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (189.2ms) DROP TABLE "billing_origins"  (164.4ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.2ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.3ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.7ms) DROP TABLE "billing_payment_types"  (172.7ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.3ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.6ms) DROP TABLE "billing_payments"  (164.2ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (189.0ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (172.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (188.3ms) DROP TABLE "billing_plus"  (188.9ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (172.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (138.3ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.4ms) DROP TABLE "billing_profiles"  (164.7ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (180.1ms) DROP TABLE "billing_pt_fp_mappings"  (164.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (287.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (146.4ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (148.0ms) DROP TABLE "billing_reports"  (180.6ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (182.4ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (180.1ms) DROP TABLE "billing_tax_groups"  (189.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.8ms) DROP TABLE "billing_versions"  (164.5ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (164.3ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.5ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 817124681) Fixture Insert (0.2ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 370448595) Fixture Delete (0.2ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374, 980190962, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 19:49:10', '2014-07-28 19:49:10', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 19:49:10', '2014-07-28 19:49:10', 980190962)  (220.5ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.5ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.4ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.4ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.4ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (62.4ms) Completed 200 OK in 175ms (Views: 156.8ms | ActiveRecord: 1.5ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.099148"]] SQL (0.2ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.101504"], ["value_cents", 200]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.114449"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.099148"]] SQL (0.2ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.132597"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.135823"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.169299"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.170373"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.173264"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.169299"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.188726"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.192180"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 19:49:11.208954"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 19:49:11.208954"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.211900"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 19:49:11.220299"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 19:49:11.220385"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 19:49:11.208954"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 19:49:11.208954"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.224029"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 19:49:11.220299"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 19:49:11.220385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.253977"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.255048"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.257844"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.253977"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.273742"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.276629"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 19:49:11.290997"], ["price_cents", 300], ["updated_at", "2014-07-28 19:49:11.290997"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.292829"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 19:49:11.302052"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 19:49:11.290997"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 19:49:11.290997"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.305354"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 19:49:11.302052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.364166"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.365516"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.368551"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.364166"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.383809"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.386532"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 19:49:11.407223"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 19:49:11.407223"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.409849"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 19:49:11.421229"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 19:49:11.407223"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 19:49:11.407223"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.424133"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 19:49:11.421229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.454760"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.455755"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.458836"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.454760"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.474885"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.477888"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 19:49:11.493029"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 19:49:11.493029"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.494688"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 19:49:11.502602"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 19:49:11.502683"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 19:49:11.493029"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 19:49:11.493029"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.505909"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 19:49:11.502602"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 19:49:11.502683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.533865"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.534862"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.537556"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.533865"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.552122"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.554774"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 19:49:11.572357"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 19:49:11.572357"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.573888"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 19:49:11.585305"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 19:49:11.572357"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 19:49:11.572357"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.588101"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 19:49:11.585305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.627172"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:11.628242"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.631551"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:11.627172"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:11.646512"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:11.649308"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.4ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 49ms (Views: 45.4ms | ActiveRecord: 0.8ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 23ms (Views: 19.3ms | ActiveRecord: 2.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 16ms (Views: 13.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 19:49:12.021822"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 19:49:12.021822"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:12.023862"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:12.038770"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:12.039810"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:12.042703"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:12.038770"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:12.058109"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:12.060907"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 19:49:12.128173"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 19:49:12.128173"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 19:49:12.130193"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:12.143399"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 298486374 [["updated_at", "2014-07-28 19:49:12.144371"], ["value_cents", 200]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:12.146994"], ["event", "update"], ["item_id", 298486374], ["item_type", "Billing::Charge"], ["object", "---\nid: 298486374\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 200\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 19:49:12.143399"]] SQL (0.1ms) UPDATE "billing_charges" SET "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190962 [["updated_at", "2014-07-28 19:49:12.160968"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 19:49:12.163731"], ["event", "update"], ["item_id", 980190962], ["item_type", "Billing::Charge"], ["object", "---\nid: 980190962\naccount_id: 980190962\nchargable_id: \nchargable_type: \nprice_cents: 100\nprice_currency: USD\ncreated_at: 2014-07-28 19:49:10.000000000 Z\nupdated_at: 2014-07-28 19:49:10.000000000 Z\nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 33ms (Views: 28.7ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (263.7ms) DROP TABLE "billing_accounts"  (159.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime)  (0.3ms) select sqlite_version(*)  (155.3ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (164.5ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.1ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (186.0ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (188.2ms) DROP TABLE "billing_charges"  (180.6ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (180.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.3ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (219.7ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (169.8ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (180.0ms) DROP TABLE "billing_departments"  (172.7ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (172.7ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.4ms) DROP TABLE "billing_modifiers"  (164.6ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (164.1ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (188.5ms) DROP TABLE "billing_operators"  (180.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (180.6ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (196.6ms) DROP TABLE "billing_origins"  (156.2ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (164.1ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (163.4ms) DROP TABLE "billing_payment_types"  (164.3ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (174.0ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (188.2ms) DROP TABLE "billing_payments"  (147.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (163.8ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (484.4ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.5ms) DROP TABLE "billing_plus"  (180.7ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (164.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (146.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.6ms) DROP TABLE "billing_profiles"  (156.4ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (172.0ms) DROP TABLE "billing_pt_fp_mappings"  (156.3ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (165.4ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (179.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (179.8ms) DROP TABLE "billing_reports"  (172.2ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (180.5ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (179.8ms) DROP TABLE "billing_tax_groups"  (181.1ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (155.6ms) DROP TABLE "billing_versions"  (147.8ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (140.0ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (156.2ms) DROP TABLE "profiles"  (156.5ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-28 20:41:29', '2014-07-28 20:41:29', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-28 20:41:29', '2014-07-28 20:41:29', 980190962)  (211.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:29.797151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:29.814734"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.3ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 20:41:29.827496"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 20:41:29.827496"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.837632"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 20:41:29.847836"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 20:41:29.847955"]] SQL (0.3ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 20:41:29.827496"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 20:41:29.827496"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.853660"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 20:41:29.847836"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 20:41:29.847955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:29.877342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 20:41:29.885191"], ["price_cents", 300], ["updated_at", "2014-07-28 20:41:29.885191"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.888326"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 20:41:29.897473"]] SQL (0.3ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 20:41:29.885191"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-28 20:41:29.885191"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.902112"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-28 20:41:29.897473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:29.925464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 20:41:29.939889"], ["fixed_value_cents", -100], ["updated_at", "2014-07-28 20:41:29.939889"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.942420"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 20:41:29.953405"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 20:41:29.939889"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-28 20:41:29.939889"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.957341"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-28 20:41:29.953405"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:29.981472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 20:41:29.990116"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 20:41:29.990116"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:29.991799"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 20:41:29.999820"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 20:41:29.999908"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-28 20:41:29.990116"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 20:41:29.990116"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 20:41:30.003679"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-28 20:41:29.999820"], ["payments_sum_cents", 700], ["updated_at", "2014-07-28 20:41:29.999908"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:30.024519"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 20:41:30.035053"], ["fixed_value_cents", 100], ["updated_at", "2014-07-28 20:41:30.035053"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:30.036690"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 20:41:30.047414"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-28 20:41:30.035053"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-28 20:41:30.035053"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-28 20:41:30.050651"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-28 20:41:30.047414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:30.074325"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Rendered /home/alex/workspace/billing/app/views/billing/modifiers/new.html.erb within layouts/billing/application (10.1ms) Completed 200 OK in 29ms (Views: 23.8ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 20:41:30.189962"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 20:41:30.189962"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:30.191954"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:30.196872"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-28 20:41:30.225904"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-28 20:41:30.225904"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-28 20:41:30.227678"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-28 20:41:30.233395"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Billing::PaymentType Load (70.4ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (183.0ms) DROP TABLE "billing_accounts"  (151.4ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar(255), "number" varchar(255))  (0.3ms) select sqlite_version(*)  (171.5ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (187.9ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (162.3ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (169.4ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.8ms) DROP TABLE "billing_charges"  (169.0ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (142.9ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (156.4ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (161.2ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (185.3ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (171.9ms) DROP TABLE "billing_departments"  (156.2ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (163.1ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (155.4ms) DROP TABLE "billing_modifiers"  (147.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (147.8ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (163.5ms) DROP TABLE "billing_operators"  (172.9ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (157.4ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (180.0ms) DROP TABLE "billing_origins"  (148.0ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (156.0ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (163.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.7ms) DROP TABLE "billing_payment_types"  (172.8ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (164.1ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.6ms) DROP TABLE "billing_payments"  (147.6ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (156.1ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (171.8ms) DROP TABLE "billing_plus"  (165.8ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (155.9ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (147.2ms) DROP TABLE "billing_profiles"  (156.5ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (172.4ms) DROP TABLE "billing_pt_fp_mappings"  (156.7ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (186.6ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (176.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (172.5ms) DROP TABLE "billing_reports"  (164.1ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (263.0ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (165.0ms) DROP TABLE "billing_tax_groups"  (172.6ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (155.4ms) DROP TABLE "billing_versions"  (148.0ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (147.8ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.3ms) DROP TABLE "profiles"  (156.6ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.6ms) SELECT version FROM "schema_migrations"  (129.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140729083408')  (132.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140729083050') ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (179.3ms) DROP TABLE "billing_accounts"  (155.1ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar(255), "number" varchar(255))  (155.8ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (163.3ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (147.0ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (153.1ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (163.4ms) DROP TABLE "billing_charges"  (139.5ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)  (147.6ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (154.9ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (153.9ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (161.7ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (185.2ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (171.8ms) DROP TABLE "billing_departments"  (164.3ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'   (171.4ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (132.1ms) DROP TABLE "billing_modifiers"  (164.5ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)  (147.9ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (171.9ms) DROP TABLE "billing_operators"  (156.3ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)   (172.5ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (196.7ms) DROP TABLE "billing_origins"  (172.6ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')  (164.5ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'  (163.0ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (171.8ms) DROP TABLE "billing_payment_types"  (156.1ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)   (164.5ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (181.2ms) DROP TABLE "billing_payments"  (147.9ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)  (164.7ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'  (171.4ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (164.7ms) DROP TABLE "billing_plus"  (157.0ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)   (156.1ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'   (154.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (164.0ms) DROP TABLE "billing_profiles"  (156.6ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (163.6ms) DROP TABLE "billing_pt_fp_mappings"  (156.3ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)  (165.7ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'  (163.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (171.7ms) DROP TABLE "billing_reports"  (164.0ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))   (164.1ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (245.9ms) DROP TABLE "billing_tax_groups"  (172.9ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)  (196.4ms) DROP TABLE "billing_versions"  (156.2ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))  (155.8ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (155.7ms) DROP TABLE "profiles"  (140.0ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)   (0.6ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_payments" Fixture Insert (0.2ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374, 980190962, 980190962) Fixture Delete (0.2ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.2ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374) Fixture Delete (0.2ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:43:56', '2014-07-29 08:43:56', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.2ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-29 08:43:56', '2014-07-29 08:43:56', 980190962)  (217.4ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (36.1ms) Completed 200 OK in 269ms (Views: 217.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.3ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 33ms (Views: 30.0ms | ActiveRecord: 1.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.3ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 61ms (Views: 56.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.4ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.3ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.4ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.3ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 46ms (Views: 40.7ms | ActiveRecord: 1.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.3ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.3ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.6ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:43:57.871846"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:43:57.871846"], ["value_cents", 100]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:57.898365"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:57.907201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:43:57.950376"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:43:57.950376"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:57.952643"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:57.958309"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 36ms (Views: 32.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.050880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.066750"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:43:58.077057"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:43:58.077057"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.079058"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:43:58.087245"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:43:58.087344"]] SQL (0.3ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-29 08:43:58.077057"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:43:58.077057"], ["value_cents", 400]] SQL (0.2ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.092416"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:43:58.087245"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:43:58.087344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.118367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:43:58.125346"], ["price_cents", 300], ["updated_at", "2014-07-29 08:43:58.125346"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.127959"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-29 08:43:58.136598"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-29 08:43:58.125346"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-29 08:43:58.125346"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.140083"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-29 08:43:58.136598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.161784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:43:58.171273"], ["fixed_value_cents", -100], ["updated_at", "2014-07-29 08:43:58.171273"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.173817"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-29 08:43:58.184229"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:43:58.171273"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-29 08:43:58.171273"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.187129"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-29 08:43:58.184229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.209740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:43:58.217800"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:43:58.217800"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.219582"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:43:58.226887"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:43:58.226976"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-29 08:43:58.217800"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:43:58.217800"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.230313"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:43:58.226887"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:43:58.226976"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.248256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:43:58.259389"], ["fixed_value_cents", 100], ["updated_at", "2014-07-29 08:43:58.259389"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.260890"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-29 08:43:58.270635"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:43:58.259389"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-29 08:43:58.259389"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:43:58.273688"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-29 08:43:58.270635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:43:58.294217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Billing::PaymentType Load (1.3ms) SELECT "billing_payment_types".* FROM "billing_payment_types" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (236.6ms) DROP TABLE "billing_accounts"  (167.8ms) CREATE TABLE "billing_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar(255) DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar(255) DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar(255), "number" varchar(255))  (0.2ms) select sqlite_version(*)  (138.7ms) CREATE INDEX "index_billing_accounts_on_billable_id_and_billable_type" ON "billing_accounts" ("billable_id", "billable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'   (154.8ms) CREATE INDEX "index_billing_accounts_on_extface_job_id" ON "billing_accounts" ("extface_job_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (145.7ms) CREATE INDEX "index_billing_accounts_on_origin_id" ON "billing_accounts" ("origin_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_origin_id' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_extface_job_id' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_accounts_on_billable_id_and_billable_type' AND type='index'  (153.1ms) CREATE INDEX "index_billing_accounts_on_report_id" ON "billing_accounts" ("report_id")  (179.8ms) DROP TABLE "billing_charges"  (147.7ms) CREATE TABLE "billing_charges" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "chargable_id" integer, "chargable_type" varchar(255), "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar(255), "description" varchar(255), "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime)   (139.5ms) CREATE INDEX "index_billing_charges_on_account_id" ON "billing_charges" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (146.7ms) CREATE INDEX "index_billing_charges_on_chargable_id_and_chargable_type" ON "billing_charges" ("chargable_id", "chargable_type")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (162.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'   (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'  (169.3ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")  (0.6ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_origin_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_origin_id' AND type='index'  (0.5ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_deleted_at' AND type='index'   (0.5ms) SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_chargable_id_and_chargable_type' AND type='index'  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_charges_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_charges_on_account_id' AND type='index'   (166.1ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")  (172.1ms) DROP TABLE "billing_departments"  (157.5ms) CREATE TABLE "billing_departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "tax_group_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (140.5ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")  (0.3ms) SELECT sql FROM sqlite_master WHERE name='index_billing_departments_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_departments_on_deleted_at' AND type='index'  (229.8ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")  (147.1ms) DROP TABLE "billing_modifiers"  (147.9ms) CREATE TABLE "billing_modifiers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar(255) DEFAULT 'USD' NOT NULL)   (139.3ms) CREATE INDEX "index_billing_modifiers_on_account_id" ON "billing_modifiers" ("account_id")  (147.3ms) DROP TABLE "billing_operators"  (164.6ms) CREATE TABLE "billing_operators" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar(255), "type" varchar(255), "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")  (172.2ms) DROP TABLE "billing_origins"  (156.1ms) CREATE TABLE "billing_origins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar(255), "payment_model" varchar(255) DEFAULT 'Billing::PaymentWithType')   (155.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_origins_on_deleted_at' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_origins_on_deleted_at' AND type='index'   (164.6ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")  (204.8ms) DROP TABLE "billing_payment_types"  (164.6ms) CREATE TABLE "billing_payment_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)  (172.4ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")  (163.5ms) DROP TABLE "billing_payments"  (156.1ms) CREATE TABLE "billing_payments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar(255) DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar(255), "payment_type_id" integer, "status" varchar(255), "name" varchar(255), "description" varchar(255), "external_token" varchar(255), "note" varchar(255), "deleted_at" datetime)   (164.2ms) CREATE INDEX "index_billing_payments_on_account_id" ON "billing_payments" ("account_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_payments_on_account_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_payments_on_account_id' AND type='index'   (154.8ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")  (163.5ms) DROP TABLE "billing_plus"  (156.1ms) CREATE TABLE "billing_plus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar(255) DEFAULT 'USD' NOT NULL, "code" varchar(255), "type" varchar(255), "banned" boolean, "deleted_at" datetime)  (156.0ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")  (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_billing_plus_on_department_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_plus_on_department_id' AND type='index'  (155.0ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")  (163.7ms) DROP TABLE "billing_profiles"  (157.9ms) CREATE TABLE "billing_profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (196.6ms) DROP TABLE "billing_pt_fp_mappings"  (156.5ms) CREATE TABLE "billing_pt_fp_mappings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)   (164.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")  (0.4ms)  SELECT sql FROM sqlite_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_billing_pt_fp_mappings_on_extface_driver_id' AND type='index'   (146.5ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")  (171.7ms) DROP TABLE "billing_reports"  (172.2ms) CREATE TABLE "billing_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar(255) DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar(255) DEFAULT 'USD' NOT NULL, "note" text, "type" varchar(255), "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar(255))  (164.3ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")  (155.6ms) DROP TABLE "billing_tax_groups"  (156.3ms) CREATE TABLE "billing_tax_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar(255), "deleted_at" datetime)   (163.5ms) DROP TABLE "billing_versions"  (156.3ms) CREATE TABLE "billing_versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar(255) NOT NULL, "item_id" integer NOT NULL, "event" varchar(255) NOT NULL, "whodunnit" varchar(255), "object" text, "created_at" datetime, "ip" varchar(255), "user_agent" varchar(255))   (156.0ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")  (173.4ms) DROP TABLE "profiles"  (172.9ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  (0.5ms) SELECT version FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "billing_payment_types" Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('MyString', 'f', 'f', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Cash', 't', 'f', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 112846265) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Fiscal', 't', 't', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 817124681) Fixture Insert (0.1ms) INSERT INTO "billing_payment_types" ("name", "cash", "fiscal", "created_at", "updated_at", "id") VALUES ('Card', 'f', 't', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 370448595) Fixture Delete (0.1ms) DELETE FROM "billing_origins" Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_origins" ("name", "payment_model", "created_at", "updated_at", "id") VALUES ('MyString', 'Billing::PaymentWithType', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_plus" Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_plus" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_payments" Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (100, 'USD', 'Billing::PaymentWithType', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962, 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_payments" ("value_cents", "value_currency", "type", "created_at", "updated_at", "id", "account_id", "payment_type_id") VALUES (200, 'USD', 'Billing::PaymentWithType', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_charges" Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (100, 'USD', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_charges" ("price_cents", "price_currency", "created_at", "updated_at", "id", "account_id") VALUES (200, 'USD', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_departments" Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group1', NULL, '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_departments" ("name", "type", "created_at", "updated_at", "id", "tax_group_id") VALUES ('Group2', NULL, '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374, 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_modifiers" Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("percent_ratio", "created_at", "updated_at", "id", "account_id") VALUES (1.0, '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_modifiers" ("fixed_value_cents", "fixed_value_currency", "created_at", "updated_at", "id", "account_id", "charge_id") VALUES (100, 'USD', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374, 980190962, 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_profiles" Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_profiles" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_operators" Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_operators" ("master_id", "name", "type", "created_at", "updated_at", "id") VALUES (1, 'MyString', NULL, '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "billing_accounts" Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id", "origin_id") VALUES ('2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962, 'Profile', 980190962, 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_accounts" ("created_at", "updated_at", "id", "billable_type", "billable_id") VALUES ('2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374, 'Profile', 980190962) Fixture Delete (0.1ms) DELETE FROM "billing_tax_groups" Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962) Fixture Insert (0.1ms) INSERT INTO "billing_tax_groups" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2014-07-29 08:45:20', '2014-07-29 08:45:20', 298486374) Fixture Delete (0.1ms) DELETE FROM "profiles" Fixture Insert (0.1ms) INSERT INTO "profiles" ("created_at", "updated_at", "id") VALUES ('2014-07-29 08:45:20', '2014-07-29 08:45:20', 980190962)  (298.6ms) commit transaction  (0.2ms) begin transaction ----------------------------------------- Billing::AccountsControllerTest: test_new ----------------------------------------- Billing::Account Load (0.5ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#new as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.2ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Rendered /home/alex/workspace/billing/app/views/billing/accounts/new.html.erb within layouts/billing/application (12.0ms) Completed 200 OK in 51ms (Views: 34.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Billing::AccountsControllerTest: test_should_get_index ------------------------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::AccountsController#index as HTML Parameters: {"profile_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 6.9ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------- BillingTest: test_truth -----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------- Billing::ModifiersControllerTest: test_should_get_new ----------------------------------------------------- Billing::Modifier Load (0.2ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ModifiersController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.2ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Charge Load (0.2ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Completed 200 OK in 38ms (Views: 33.5ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------- Billing::PaymentsControllerTest: test_should_get_new ---------------------------------------------------- Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.2ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.2ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::PaymentsController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 9ms (Views: 5.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Billing::ModifierTest: test_allow_only_one_global_account_modifier ------------------------------------------------------------------ Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.2ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.2ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Billing::ModifierTest: test_allow_only_one_modifier_per_charge -------------------------------------------------------------- Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 980190962 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- Billing::ChargeTest: test_args_to_attributes_class_method --------------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------- Billing::AccountTest: test_account_with_payments_should_have_origin ------------------------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.335125"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------- Billing::AccountTest: test_autofin ---------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.351790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.359731"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:45:21.359731"], ["value_cents", 400]] SQL (0.3ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.369079"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:45:21.379144"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:45:21.379234"]] SQL (0.2ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.359731"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:45:21.359731"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.383142"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:45:21.379144"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:45:21.379234"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- Billing::AccountTest: test_charge --------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.404091"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "billing_charges" ("account_id", "created_at", "price_cents", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.411221"], ["price_cents", 300], ["updated_at", "2014-07-29 08:45:21.411221"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.413971"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Charge"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.3ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-29 08:45:21.424054"]] SQL (0.2ms) UPDATE "billing_charges" SET "account_id" = ?, "created_at" = ?, "id" = ?, "price_cents" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_charges"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.411221"], ["id", 980190963], ["price_cents", 300], ["updated_at", "2014-07-29 08:45:21.411221"], ["value_cents", 300]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.428013"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Charge"], ["object", "---\nid: \naccount_id: \nchargable_id: \nchargable_type: \nprice_cents: 0\nprice_currency: USD\ncreated_at: \nupdated_at: \nname: \ndescription: \norigin_id: \nvalue_cents: 0\nvalue_currency: USD\ndeleted_at: \nrevenue_at: \n"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -1000], ["charges_sum_cents", 600], ["surcharges_sum_cents", 700], ["total_cents", 1300], ["updated_at", "2014-07-29 08:45:21.424054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------- Billing::AccountTest: test_discount ----------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.450626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.2ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:45:21.460596"], ["fixed_value_cents", -100], ["updated_at", "2014-07-29 08:45:21.460596"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.463082"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-29 08:45:21.474620"]] SQL (0.2ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:45:21.460596"], ["fixed_value_cents", -100], ["id", 980190963], ["updated_at", "2014-07-29 08:45:21.460596"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.478337"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "discounts_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -300], ["discounts_sum_cents", 100], ["total_cents", 600], ["updated_at", "2014-07-29 08:45:21.474620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------ Billing::AccountTest: test_pay ------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.529152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.538497"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:45:21.538497"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.540399"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:45:21.549694"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:45:21.549793"]] SQL (0.1ms) UPDATE "billing_payments" SET "account_id" = ?, "created_at" = ?, "id" = ?, "payment_type_id" = ?, "type" = ?, "updated_at" = ?, "value_cents" = ? WHERE "billing_payments"."type" IN ('Billing::PaymentWithType') AND "billing_payments"."id" = 980190963 [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.538497"], ["id", 980190963], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:45:21.538497"], ["value_cents", 400]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.553316"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Payment"], ["object", "---\nid: \naccount_id: \nvalue_cents: 0\nvalue_currency: USD\ncreated_at: \nupdated_at: \ntype: \npayment_type_id: \nstatus: \nname: \ndescription: \nexternal_token: \nnote: \ndeleted_at: \n"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "finalized_at" = ?, "payments_sum_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", 0], ["finalized_at", "2014-07-29 08:45:21.549694"], ["payments_sum_cents", 700], ["updated_at", "2014-07-29 08:45:21.549793"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------ Billing::AccountTest: test_surcharge ------------------------------------ Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.575229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 298486374]]  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.2ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1 SQL (0.1ms) INSERT INTO "billing_modifiers" ("account_id", "charge_id", "created_at", "fixed_value_cents", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:45:21.586585"], ["fixed_value_cents", 100], ["updated_at", "2014-07-29 08:45:21.586585"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.588306"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Modifier"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.2ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-29 08:45:21.599703"]] SQL (0.1ms) UPDATE "billing_modifiers" SET "account_id" = ?, "charge_id" = ?, "created_at" = ?, "fixed_value_cents" = ?, "id" = ?, "updated_at" = ? WHERE "billing_modifiers"."id" = 980190963 [["account_id", 980190962], ["charge_id", 298486374], ["created_at", "2014-07-29 08:45:21.586585"], ["fixed_value_cents", 100], ["id", 980190963], ["updated_at", "2014-07-29 08:45:21.586585"]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type", "object") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.602535"], ["event", "update"], ["item_id", 980190963], ["item_type", "Billing::Modifier"], ["object", "---\nid: \naccount_id: \ncharge_id: \npercent_ratio: \ncreated_at: \nupdated_at: \nfixed_value_cents: 0\nfixed_value_currency: USD\n"]] Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."charge_id" = 298486374 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."account_id" = 980190962) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."id" != 980190963 AND "billing_modifiers"."charge_id" = 298486374) LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -500], ["surcharges_sum_cents", 500], ["total_cents", 800], ["updated_at", "2014-07-29 08:45:21.599703"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- Billing::AccountTest: test_validate_positive_total -------------------------------------------------- Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.625511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."account_id" = 980190962 AND "billing_modifiers"."charge_id" IS NULL) LIMIT 1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- Billing::PaymentTest: test_create --------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.667766"], ["payment_type_id", 980190962], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:45:21.667766"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.669562"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.675263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- Billing::PaymentTest: test_should_be_instance_of_account's_origin_payment_model ------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.1ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- Billing::PaymentTest: test_should_be_single_cash_payments --------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.1ms) SAVEPOINT active_record_1 Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]] Billing::Origin Load (0.0ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.0ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] SQL (0.2ms) INSERT INTO "billing_payments" ("account_id", "created_at", "payment_type_id", "type", "updated_at", "value_cents") VALUES (?, ?, ?, ?, ?, ?) [["account_id", 980190962], ["created_at", "2014-07-29 08:45:21.705059"], ["payment_type_id", 112846265], ["type", "Billing::PaymentWithType"], ["updated_at", "2014-07-29 08:45:21.705059"], ["value_cents", 100]] SQL (0.1ms) INSERT INTO "billing_versions" ("created_at", "event", "item_id", "item_type") VALUES (?, ?, ?, ?) [["created_at", "2014-07-29 08:45:21.706842"], ["event", "create"], ["item_id", 980190963], ["item_type", "Billing::Payment"]]  (0.1ms) SELECT COUNT(*) FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? [["billable_id", 980190962], ["billable_type", "Profile"]] SQL (0.1ms) UPDATE "billing_accounts" SET "balance_cents" = ?, "charges_sum_cents" = ?, "name" = ?, "number" = ?, "payments_sum_cents" = ?, "surcharges_sum_cents" = ?, "total_cents" = ?, "updated_at" = ? WHERE "billing_accounts"."id" = 980190962 [["balance_cents", -400], ["charges_sum_cents", 300], ["name", "B:980190962:2"], ["number", "980190962:2"], ["payments_sum_cents", 300], ["surcharges_sum_cents", 400], ["total_cents", 700], ["updated_at", "2014-07-29 08:45:21.713000"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 112846265]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------- Billing::PaymentTest: test_should_have_same_fiscal_flag_as_other_account_payments --------------------------------------------------------------------------------- Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.0ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 817124681]]  (0.0ms) SAVEPOINT active_record_1 Billing::Origin Load (0.1ms) SELECT "billing_origins".* FROM "billing_origins" WHERE "billing_origins"."id" = ? LIMIT 1 [["id", 980190962]]  (0.0ms) SELECT COUNT(*) FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."account_id" = ? [["account_id", 980190962]] Billing::Modifier Load (0.0ms) SELECT "billing_modifiers".* FROM "billing_modifiers" WHERE "billing_modifiers"."account_id" = ? [["account_id", 980190962]] Billing::Charge Load (0.0ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Payment Load (0.1ms) SELECT "billing_payments".* FROM "billing_payments" WHERE "billing_payments"."account_id" = ? [["account_id", 980190962]] Billing::PaymentType Load (0.1ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Billing::PaymentType Load (0.0ms) SELECT "billing_payment_types".* FROM "billing_payment_types" WHERE "billing_payment_types"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Billing::ChargesControllerTest: test_should_get_new --------------------------------------------------- Billing::Charge Load (0.1ms) SELECT "billing_charges".* FROM "billing_charges" WHERE "billing_charges"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."id" = ? LIMIT 1 [["id", 980190962]] Profile Load (0.0ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = ? LIMIT 1 [["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Processing by Billing::ChargesController#new as HTML Parameters: {"profile_id"=>"980190962", "account_id"=>"980190962"} Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."id" = 980190962 LIMIT 1 Billing::Account Load (0.1ms) SELECT "billing_accounts".* FROM "billing_accounts" WHERE "billing_accounts"."billable_id" = ? AND "billing_accounts"."billable_type" = ? AND "billing_accounts"."id" = ? LIMIT 1 [["billable_id", 980190962], ["billable_type", "Profile"], ["id", 980190962]] Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Billing::Profile Load (0.1ms) SELECT "billing_profiles".* FROM "billing_profiles" ORDER BY "billing_profiles"."id" ASC LIMIT 1 Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction